Closed bmarwell closed 2 years ago
The original intent was "last updated", which was content file specific. Knowing when publishing occurred was taken care of by published_date
which was not content file specific.
Could you elaborate on what you're trying to achieve?
Hi @jonbullock,
I want to properly set those fields:
<meta property="article:published_time" content="${content.published_date?datetime?string.iso_s_u}"/>
<meta name="publish_date" property="og:publish_date" content="${content.published_date?datetime?string.iso_s_u}"/>
<meta property="article:modification_time" content="${content.date?datetime?string.iso_s_u}"/>
If no explicit "published_date" is set, e.g. via :jbake-published_date:
, then it could (should?) be auto-filled with date
.
Ah, I now understand what I'm missing.
If jbake-date is the "last-modified-date", then I think I'm missing a "first-published-on-date".
jbake-published_date is the date when the last baking of everything took place. That's not useful for those meta tags, as they are content related.
Hi,
the date field (metadata) is very ambigious.
Writing the date in adoc (one is undocumented)
For one, you can write it in two ways:
or (undocumented):
Ok, now I am trying to get things "right". For the sitemap, we have a field like this:
Modification time
Now, date seems to be the last modification time. So far, so good. This will also make sense because the documentation states:
Published time
Now, we could need the "first published time" as well. We can add it like so:
HTML Metadata use
Ok, now we have different headers for different types: Post and Page.
If the published_date is set, we could use it for:
Otherwise we would need to use
content.date
instead, because it should never be empty.We could then define:
Question: post.published_time?
So the question remains: is the default date field intended as "last updated" time or as "first published"? I ask because the latter makes sense to assume because of this sentence in the documentation:
I think it would consider a
published_date
field instead and only fall back todate
when the first one does not exist.