chipzoller / hugo-clarity

A theme for Hugo based on VMware Clarity
Other
577 stars 262 forks source link

added lastmod date after slash in the post header if available. #450

Open McAviti opened 11 months ago

McAviti commented 11 months ago

Pull Request type

Please check the type of change your PR introduces:

Current state

If a post has a last modified attribute ("lastmod"), this is not visible in the rendered article.

Issue Number(s):

Proposed changes

If a post has a "lastmod" metadata attribute is present, it is added after the creation date, separated by a slash.

Screenshots, if applicable

Screenshot 2023-10-02 012255

Checklist

onweru commented 11 months ago

@McAviti,

Thanks for contributing. To show or not to show LastMod should be an opt-in feature; i.e disabled by default, with a variable in the config to turn it on.

Could you tweak this PR to satisfy that condition? If not, let me know I can help out .

McAviti commented 11 months ago

Sure @onweru , that's reasonable, I hope I got it right. I added $showLastmod as Param, and I additionally suggest a $lastmodSeparator Param to be able to override the default "/" I arbitrarily selected. What do you think of that? Please review.