From 481aae25ca1a09bfce29a42430d4c4b37f7f7955 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sun, 19 Jan 2025 10:30:35 +0100 Subject: [PATCH] Improve example --- example_workdir/.gitignore | 1 + example_workdir/posts/cool-post.html | 1 + example_workdir/site-config.json | 7 ++++++- example_workdir/template/article_template.html | 7 ++++++- example_workdir/template/index_template.html | 2 +- example_workdir/template/static/style.css | 2 +- 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/example_workdir/.gitignore b/example_workdir/.gitignore index 070d6e2..e9cdeb7 100644 --- a/example_workdir/.gitignore +++ b/example_workdir/.gitignore @@ -1 +1,2 @@ +# Ignore output generated_out/ \ No newline at end of file diff --git a/example_workdir/posts/cool-post.html b/example_workdir/posts/cool-post.html index c9d7f0f..bf453ee 100644 --- a/example_workdir/posts/cool-post.html +++ b/example_workdir/posts/cool-post.html @@ -1,5 +1,6 @@ title lorem ipsum 2: the lorem ipsuming summary watch skibidi toilet free online no virus +customText This article is cool because it has small text

THI SI ANOTEHR POSTT

diff --git a/example_workdir/site-config.json b/example_workdir/site-config.json index 80d6073..a1eff92 100644 --- a/example_workdir/site-config.json +++ b/example_workdir/site-config.json @@ -1,4 +1,9 @@ { "name": "my blog", - "baseUrl": "https://example.com" + "baseUrl": "https://example.com", + + "coolProperty": 1231, + "coolerProperty": { + "isMap": "yes" + } } \ No newline at end of file diff --git a/example_workdir/template/article_template.html b/example_workdir/template/article_template.html index 13b858f..5eebe50 100644 --- a/example_workdir/template/article_template.html +++ b/example_workdir/template/article_template.html @@ -17,12 +17,17 @@ -

{{ site.name }}

+

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

{{ article.title }}

{{ article.summary }}

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

+ + + {% if article.custom.containsKey("customtext") %} + {{ article.custom.customtext }} + {% endif %}
diff --git a/example_workdir/template/index_template.html b/example_workdir/template/index_template.html index dfa3c29..0d64d42 100644 --- a/example_workdir/template/index_template.html +++ b/example_workdir/template/index_template.html @@ -8,7 +8,7 @@ -

{{ site.name }}

+

{{ site.name }} - {{ site.custom.coolProperty }}

{% for article in articles %}
diff --git a/example_workdir/template/static/style.css b/example_workdir/template/static/style.css index e0f5dcb..5e12410 100644 --- a/example_workdir/template/static/style.css +++ b/example_workdir/template/static/style.css @@ -8,7 +8,7 @@ article { } article > header { - padding: 10px; + padding: 5px 20px; background: white; color: black; } \ No newline at end of file