diff options
author | hubzilla <git@macgirvin.com> | 2016-08-01 09:13:43 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-01 09:13:43 +1000 |
commit | 74c68f09e5d7fa28d7345e18e813dc726309ea48 (patch) | |
tree | a6e4b55e1eb695242165256808e47bed51a9df78 /doc/webpage-element-import.md | |
parent | da9b6690e565452a9a9d69084a07ac48005d7e60 (diff) | |
parent | 99afd0a449cde502b32c30d5b6170c6b87b85edc (diff) | |
download | volse-hubzilla-74c68f09e5d7fa28d7345e18e813dc726309ea48.tar.gz volse-hubzilla-74c68f09e5d7fa28d7345e18e813dc726309ea48.tar.bz2 volse-hubzilla-74c68f09e5d7fa28d7345e18e813dc726309ea48.zip |
Merge pull request #469 from anaqreon/website-import
Website import tool
Diffstat (limited to 'doc/webpage-element-import.md')
-rw-r--r-- | doc/webpage-element-import.md | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/doc/webpage-element-import.md b/doc/webpage-element-import.md new file mode 100644 index 000000000..4330227c2 --- /dev/null +++ b/doc/webpage-element-import.md @@ -0,0 +1,94 @@ +## <a href="#webpage-element-import"></a>Webpage element import + +There are two methods of importing webpage elements: uploading a zip file or +referencing a local cloud files folder. Both methods require that the webpage +elements are specified using a specific folder structure. The import tool makes +it possible to import all the elements necessary to construct an entire website +or set of websites. The goal is to accommodate external development of webpages +as well as tools to simplify and automate deployment on a hub. + +### Folder structure +Element definitions must be stored in the repo root under folders called + + /pages/ + /blocks/ + /layouts/ + + +Each element of these types must be defined in an individual subfolder using two files: one JSON-formatted file for the metadata and one plain text file for the element content. + +### Page elements +Page element metadata is specified in a JSON-formatted file called `page.json` with the following properties: + + * title + * pagelink + * mimetype + * layout + * contentfile + +**Example** + +Files: + + /pages/my-page/page.json + /pages/my-page/my-page.bbcode + +Content of `page.json`: + + { + "title": "My Page", + "pagelink": "mypage", + "mimetype": "text/bbcode", + "layout": "my-layout", + "contentfile": "my-page.bbcode" + } + + +### Layout elements +Layout element metadata is specified in a JSON-formatted file called `layout.json` with the following properties: + + * name + * description + * contentfile + +**Example** + +Files: + + /layouts/my-layout/layout.json + /layouts/my-layout/my-layout.bbcode + +Content of `layout.json`: + + { + "name": "my-layout", + "description": "Layout for my project page", + "contentfile": "my-layout.bbcode" + } + + +### Block elements +Block element metadata is specified in a JSON-formatted file called `block.json` with the following properties: + + * name + * title + * mimetype + * contentfile + +**Example** + +Files: + + /blocks/my-block/block.json + /blocks/my-block/my-block.html + +Content of `block.json`: + + + { + "name": "my-block", + "title": "", + "mimetype": "text/html", + "contentfile": "my-block.html" + } +
\ No newline at end of file |