From 0b91f2d7a13d8c156d867775907125e5f37e027b Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Wed, 12 Feb 2025 16:23:04 +0100 Subject: [PATCH] docs: Update example workdir with YAML Signed-off-by: Minecon724 --- example_workdir/site-config.json | 9 --------- example_workdir/site-config.yml | 10 ++++++++++ example_workdir/template/article_template.html | 7 ++++++- example_workdir/template/index_template.html | 6 ++++++ 4 files changed, 22 insertions(+), 10 deletions(-) delete mode 100644 example_workdir/site-config.json create mode 100644 example_workdir/site-config.yml diff --git a/example_workdir/site-config.json b/example_workdir/site-config.json deleted file mode 100644 index a1eff92..0000000 --- a/example_workdir/site-config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "my blog", - "baseUrl": "https://example.com", - - "coolProperty": 1231, - "coolerProperty": { - "isMap": "yes" - } -} \ No newline at end of file diff --git a/example_workdir/site-config.yml b/example_workdir/site-config.yml new file mode 100644 index 0000000..6ba34c1 --- /dev/null +++ b/example_workdir/site-config.yml @@ -0,0 +1,10 @@ +name: my blog +baseUrl: https://example.com + +coolProperty: 1231 +coolerProperty: + isMap: true + aList: + - a value + - another value + - check out site-config.yml! \ No newline at end of file diff --git a/example_workdir/template/article_template.html b/example_workdir/template/article_template.html index 5eebe50..3708ac1 100644 --- a/example_workdir/template/article_template.html +++ b/example_workdir/template/article_template.html @@ -20,7 +20,12 @@

{{ site.name }} - {{ site.custom.coolerProperty.get('isMap') }}

-

{{ article.title }}

+

+ {{ article.title }} + {% if article.draft %} + DRAFT + {% endif %} +

{{ article.summary }}

{{ article.createdAt | date("dd.MM.yyyy") }} by {{ article.createdBy }}

diff --git a/example_workdir/template/index_template.html b/example_workdir/template/index_template.html index 0d64d42..d49b62b 100644 --- a/example_workdir/template/index_template.html +++ b/example_workdir/template/index_template.html @@ -19,5 +19,11 @@
{% endfor %} + + \ No newline at end of file