From e78f3e80c4d9220327d21e68c6ce483402afc5af Mon Sep 17 00:00:00 2001 From: subnixr Date: Sat, 21 Jul 2018 02:39:08 +0200 Subject: [PATCH] add example site --- .gitignore | 1 + example/markdown/page1.md | 13 +++++++++++++ example/markdown/page2.md | 11 +++++++++++ example/markdown/test.md | 8 -------- example/markdown/test_other_template.md | 8 -------- example/templates/default.html | 16 ++++++++++------ example/templates/index.html | 14 +++++++++----- example/templates/other_template.html | 11 ----------- example/templates/rss.xml | 17 +++++++++++++++++ 9 files changed, 61 insertions(+), 38 deletions(-) create mode 100644 example/markdown/page1.md create mode 100644 example/markdown/page2.md delete mode 100644 example/markdown/test.md delete mode 100644 example/markdown/test_other_template.md delete mode 100644 example/templates/other_template.html create mode 100644 example/templates/rss.xml diff --git a/.gitignore b/.gitignore index 3752773..f4b95d5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.egg-info *.pyc test_site/ +example/target/ diff --git a/example/markdown/page1.md b/example/markdown/page1.md new file mode 100644 index 0000000..e1121b6 --- /dev/null +++ b/example/markdown/page1.md @@ -0,0 +1,13 @@ +Template: default +Title: Page one +Description: Test page one +When: today + + +# Header + +Some text + +- one +- two + diff --git a/example/markdown/page2.md b/example/markdown/page2.md new file mode 100644 index 0000000..0bfbb40 --- /dev/null +++ b/example/markdown/page2.md @@ -0,0 +1,11 @@ +Template: default +Title: Page two +When: tomorrow + + +# Header + +- three +- four + +Bottom text \ No newline at end of file diff --git a/example/markdown/test.md b/example/markdown/test.md deleted file mode 100644 index 1f32829..0000000 --- a/example/markdown/test.md +++ /dev/null @@ -1,8 +0,0 @@ -Title: Home Page -Author: anon - - -# Site - -Some text - diff --git a/example/markdown/test_other_template.md b/example/markdown/test_other_template.md deleted file mode 100644 index fa0ebbe..0000000 --- a/example/markdown/test_other_template.md +++ /dev/null @@ -1,8 +0,0 @@ -Title: Other Test Page -Template: other_template - - -# Title - -Some other text - diff --git a/example/templates/default.html b/example/templates/default.html index 5cbc86d..13b20f9 100644 --- a/example/templates/default.html +++ b/example/templates/default.html @@ -1,10 +1,14 @@ - - {{ title }} - - + + {{ title }} + + + +
{{ content }} - - +
+ + + \ No newline at end of file diff --git a/example/templates/index.html b/example/templates/index.html index da31da3..bb21d84 100644 --- a/example/templates/index.html +++ b/example/templates/index.html @@ -6,11 +6,15 @@ - + {% for pname, page in pages.items() %} +
+

+ {{page.title}} +

+

{{page.description}}

+

{{page.when}}

+
+ {% endfor %} \ No newline at end of file diff --git a/example/templates/other_template.html b/example/templates/other_template.html deleted file mode 100644 index a1939c6..0000000 --- a/example/templates/other_template.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - {{ title }} - - - -

Other Template

- {{ content }} - - diff --git a/example/templates/rss.xml b/example/templates/rss.xml new file mode 100644 index 0000000..3018f9a --- /dev/null +++ b/example/templates/rss.xml @@ -0,0 +1,17 @@ + + + + + Unit + https://unit.macaomilano.org + unit + {% for pname, page in pages.items() %} + + {{ page.title }} + {{ page.link }} + {{ page.description }} + + {% endfor %} + + + \ No newline at end of file