diff --git a/README.md b/README.md index 714979b..9d1a1fe 100644 --- a/README.md +++ b/README.md @@ -24,22 +24,30 @@ Before you read on - check out this video: │   │   ├── markdown.md │   │   ├── piratenames.json │   │   └── xtreme.html -│   └── _templates +│ │ +│   ├── _data +│   │   ├── xmen.yaml +│   │   └── families.json +│ │ +│ └── _templates │   ├── default.html │   └── info_page.html └── web ├── about │   ├── index.html │   └── packages -> ../../packages + │ ├── index.html ├── main.dart ├── markdown.html ├── packages -> ../packages ├── piratenames.json + │ ├── styles │   ├── main.css │   ├── main.scss │   └── packages -> ../../packages + │ └── xtreme.html ``` @@ -58,6 +66,26 @@ The following file-formats are supported: - .html - .scss - .css + +**html/_data**: [optional] This is the place where you can store your data-files. +The following file-formats are supported: + +- .yaml +- .json + +**SiteGen** injects your data into a global _data variable. +Here is a sample how to use such data: + +```html + +``` + +**SiteGen** + **html/_templates**: The directory containing your HTML+Mustache templates. diff --git a/example/simple/html/_content/families.html b/example/simple/html/_content/families.html new file mode 100644 index 0000000..2f426e1 --- /dev/null +++ b/example/simple/html/_content/families.html @@ -0,0 +1,13 @@ +title: Families +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + \ No newline at end of file diff --git a/example/simple/html/_content/xmen.html b/example/simple/html/_content/xmen.html new file mode 100644 index 0000000..d88bbbd --- /dev/null +++ b/example/simple/html/_content/xmen.html @@ -0,0 +1,7 @@ +title: X-Men +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + \ No newline at end of file diff --git a/example/simple/html/_data/families.json b/example/simple/html/_data/families.json new file mode 100644 index 0000000..7d17ee5 --- /dev/null +++ b/example/simple/html/_data/families.json @@ -0,0 +1,17 @@ +[ + { + "surname": "Jones", + "members": [ + {"given": "Jim"}, + {"given": "John"}, + {"given": "Jill"} + ] + }, + { + "surname": "Smith", + "members": [ + {"given": "Steve"}, + {"given": "Sally"} + ] + } +] \ No newline at end of file diff --git a/example/simple/html/_data/xmen.yaml b/example/simple/html/_data/xmen.yaml new file mode 100644 index 0000000..048c288 --- /dev/null +++ b/example/simple/html/_data/xmen.yaml @@ -0,0 +1,7 @@ +- Professor X +- Beast +- Colossus +- Cyclops +- Iceman +- Marvel Girl +- Storm diff --git a/example/simple/html/_templates/default.html b/example/simple/html/_templates/default.html index 6dc0258..c60dda1 100644 --- a/example/simple/html/_templates/default.html +++ b/example/simple/html/_templates/default.html @@ -31,7 +31,7 @@

{{title}}

by {{_site.author}} - Template: {{template}} + Template: {{_template}} diff --git a/example/simple/web/about/index.html b/example/simple/web/about/index.html index fcd2555..041d257 100644 --- a/example/simple/web/about/index.html +++ b/example/simple/web/about/index.html @@ -7,7 +7,7 @@ About | HudriWudri - +