mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 03:00:50 +02:00
posts: Support lastmod
param to show date last modified
This commit is contained in:
parent
3ebbf25425
commit
97590cb12e
9 changed files with 15 additions and 8 deletions
|
@ -37,7 +37,7 @@ defaultContentLanguageInSubdir = false
|
|||
|
||||
# Date format (refer to Go's date format: http://flippinggodateformat.com )
|
||||
# Examples: "Mon, Jan 2, 2006" or "2006-01-02"
|
||||
date_format = "Mon, Jan 2, 2006"
|
||||
date_format = "Jan 2, 2006"
|
||||
|
||||
# Enable global LaTeX math rendering?
|
||||
# If false, you can enable it locally on a per page basis.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
+++
|
||||
title = "Posts"
|
||||
date = "2017-01-01T00:00:00Z"
|
||||
date = 2017-01-01
|
||||
math = false
|
||||
highlight = false
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
+++
|
||||
date = "2016-04-20T12:00:00"
|
||||
date = 2016-04-20
|
||||
lastmod = 2017-09-03
|
||||
draft = false
|
||||
tags = ["academic", "hugo"]
|
||||
title = "Getting started with the Academic framework for Hugo"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
+++
|
||||
date = "2016-04-20T11:00:00"
|
||||
date = 2016-04-18
|
||||
draft = false
|
||||
tags = ["academic", "hugo"]
|
||||
title = "Managing content"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
+++
|
||||
date = "2014-03-10T00:00:00"
|
||||
date = 2014-03-10
|
||||
draft = false
|
||||
tags = ["jekyll"]
|
||||
title = "Migrate from Jekyll to Hugo"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
+++
|
||||
date = "2016-04-20T11:00:00"
|
||||
date = 2016-04-19
|
||||
draft = false
|
||||
tags = ["academic", "hugo"]
|
||||
title = "Customizing the homepage with widgets"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
+++
|
||||
date = "2016-04-20T10:00:00"
|
||||
date = 2016-04-17
|
||||
draft = false
|
||||
tags = []
|
||||
title = "Writing content with Markdown, LaTeX, and Shortcodes"
|
||||
|
|
|
@ -66,6 +66,9 @@
|
|||
- id: date
|
||||
translation: Date
|
||||
|
||||
- id: last_updated
|
||||
translation: Last updated on
|
||||
|
||||
- id: links
|
||||
translation: Links
|
||||
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
<div class="article-metadata">
|
||||
|
||||
<span class="article-date">
|
||||
{{ if ne $.Params.Lastmod $.Params.Date }}
|
||||
{{ i18n "last_updated" }}
|
||||
{{ end }}
|
||||
<time datetime="{{ $.Date }}" itemprop="datePublished">
|
||||
{{ $.Date.Format $.Site.Params.date_format }}
|
||||
{{ $.Lastmod.Format $.Site.Params.date_format }}
|
||||
</time>
|
||||
</span>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue