aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Alaa <ahmed@gumx.cc>2023-12-05 13:13:10 +0000
committerAhmed Alaa <ahmed@gumx.cc>2023-12-05 13:13:10 +0000
commit0ec159c78389bd9f3ab8205d1810974f84f24e04 (patch)
treec6c638c25752d5eb52e27e443a6c6b2737f2b3ea
parent4f540858709719a5ab1e4fdc7a7e0d03a7f2df2f (diff)
parent58fc7dd95a75ba9568b7f5e62d6d7eff93bb1b24 (diff)
Merge branch 'main' into 'main'
Make dates in post titles optional See merge request atgumx/no-style-please!5
-rw-r--r--README.md6
-rw-r--r--templates/index.html2
2 files changed, 7 insertions, 1 deletions
diff --git a/README.md b/README.md
index 1495b86..bbd5216 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,12 @@ To enable listing of pages in homepage add the following in `config.toml`
list_pages = true
```
+If you do not want the date of the post added next to the title in the list, add the following as well:
+
+```toml
+no_list_date = true
+```
+
### Header and footer nav links
Also in the `extra` section in `config.toml`
diff --git a/templates/index.html b/templates/index.html
index dafb0e4..c44de41 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -12,7 +12,7 @@
<ul>
{% for page in pages %}
<li>
- <a href="{{ page.permalink | safe }}">{% if page.date %}{{ page.date }} - {% endif %}{{ page.title }}</a>
+ <a href="{{ page.permalink | safe }}">{% if page.date and not config.extra.no_list_date %}{{ page.date }} - {% endif %}{{ page.title }}</a>
<br />
{{ page.description }}
</li>