Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date formatting updated #60

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ paginate = 5 #frontpage pagination
"A port of Tracks by Compete Themes."
]

# Set the date formatting as required, comment/uncomment as required
DateForm = "2 January"
# DateForm = "2 January 2006"


# Contact page
# Since this template is static, the contact form uses www.formspree.io as a
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

{{ end }}
<div class="entry-meta">
<span class="date">{{ .Date.Format "02 January" }}</span> <span> / </span>
<span class="date">{{ .Date.Format .Site.Params.DateForm }}</span> <span> / </span>

<span class="author">
<a href="{{ $writer.link | default "" | absURL}}" title="Posts by {{ .Params.writer | default "" }}" rel="author">{{ .Params.writer | default ""}}</a>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/category.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1 class="screen-reader-text">Posts</h1>

<div class="excerpt-container">
<div class="excerpt-meta">
<span class="date">{{ .Date.Format "02 January" }}</span>
<span class="date">{{ .Date.Format .Site.Params.DateForm }}</span>



Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/portfolio.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 class="screen-reader-text">Posts</h1>
{{ end }}
<div class="excerpt-container">
<div class="excerpt-meta">
<span class="date">{{ .Date.Format "02 January" }}</span>
<span class="date">{{ .Date.Format .Site.Params.DateForm }}</span>

{{ if and (isset .Site.Params "authorlink") .Site.Params.authorLink }}
{{ if and (isset .Site.Params "author") .Site.Params.author }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h1 class="screen-reader-text">Posts</h1>

<div class="excerpt-container">
<div class="excerpt-meta">
<span class="date">{{ .Date.Format "02 January 2006" }}</span> <span> / </span>
<span class="date">{{ .Date.Format .Site.Params.DateForm }}</span> <span> / </span>

{{ if and (isset .Site.Params "author") .Site.Params.author }}

Expand Down