♻️ refactor: set datetime format as a variable
This commit is contained in:
parent
2cef2e5502
commit
988034ba4e
@ -18,6 +18,8 @@ highlight_theme = "css"
|
||||
toc = true
|
||||
use_cdn = false
|
||||
|
||||
timeformat = "%d %B %Y" # Default format: "31 January 2049"
|
||||
|
||||
#Full path after the base URL required. So if you were to place it in "static" it would be "/favicon.ico"
|
||||
favicon = ""
|
||||
|
||||
@ -30,6 +32,7 @@ menu = [
|
||||
{ name = "tags", url = "$BASE_URL/tags" },
|
||||
{ name = "projects", url = "$BASE_URL/projects" },
|
||||
]
|
||||
|
||||
#The icons available can be found in "social_icons" in the "static" folder
|
||||
socials = [
|
||||
{ name = "github", url = "$BASE_URL/atom.xml", icon = "rss" },
|
||||
@ -38,4 +41,4 @@ socials = [
|
||||
{ name = "instagram", url = "https://instagram.com/oskerwyld", icon = "instagram" },
|
||||
{ name = "youtube", url = "https://youtube.com/@oskerwyld", icon = "youtube" },
|
||||
{ name = "spotify", url = "https://open.spotify.com/artist/5Hv2bYBhMp1lUHFri06xkE", icon = "spotify" },
|
||||
]
|
||||
]
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
<div class="meta">
|
||||
{%- if page.date %}
|
||||
{{ page.date | date(format="%d %B %Y") }}
|
||||
{{ page.date | date(format=config.extra.timeformat) }}
|
||||
{% endif -%}
|
||||
<br />
|
||||
<span>{{ page.reading_time }} minute read</span>
|
||||
@ -86,7 +86,7 @@
|
||||
|
||||
<div class="meta">
|
||||
{% if page.date %}
|
||||
Posted on {{ page.date | date(format="%d %B %Y") }}
|
||||
Posted on {{ page.date | date(format=config.extra.timeformat) }}
|
||||
~
|
||||
{% endif %}
|
||||
<span> {{ page.reading_time }} minute read</span>
|
||||
@ -182,7 +182,7 @@
|
||||
|
||||
<div class="meta">
|
||||
{%- if page.date %}
|
||||
{{ page.date | date(format="%d %B %Y") }}
|
||||
{{ page.date | date(format=config.extra.timeformat) }}
|
||||
{% endif -%}
|
||||
{% if page.draft %}
|
||||
<span class="draft-label">DRAFT</span>
|
||||
@ -212,7 +212,7 @@
|
||||
{% for page in pages %}
|
||||
<li class="post">
|
||||
<a href="{{ page.permalink }}">{{ page.title }}</a>
|
||||
<span class="meta">{{ page.date | date(format="%d %B %Y") }}</span>
|
||||
<span class="meta">{{ page.date | date(format=config.extra.timeformat) }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
Loading…
x
Reference in New Issue
Block a user