Displaying modification dates for markdown pages? #1242
Replies: 3 comments 2 replies
-
When you set:
The last modification date of a page is shown — see for example: https://hub.botstudioo.com/docs/functional-system/nodes/ Note, you can override the current behavior by copying |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for the very fast and helpful reply. That seems to be exactly the desired behavior. |
Beta Was this translation helpful? Give feedback.
-
Actually, I prefer not to use Git for my tiny pages. My actual text is only a few kB in size. Just using Git increases already the directory size a lot, and hosting the full page content at GitHub seems to be wasting a lot of GitHub resources. By modifying layouts/partials/main/last-modified.html I found a good solution for myself, see below. Generally, I think the following behavior would be great: If enableGitInfo = true, use and display dates from Git. Additionally, an option to show dates at the top would be nice. With Google and some GPT-4 support I found the following solution, which is exactly what I want:
I was really surprised how well GPT-4 understands this syntax. |
Beta Was this translation helpful? Give feedback.
-
Generally, I like it very much when web pages display a creation date, or date of last editing. For some pages that might not be needed, but often it is useful. I have wasted already much time studying pages found by Google, just to discover later that the page was written years ago and the content is fully outdated.
For HTML pages it is easy to add a date display somewhere, I even found a way to use a Hugo shortcode to add the current date automatically.
But most of my content files are markdown. OK, I could insert a date somewhere in the text. But I would prefer a dedicated location, and if possible use of the date value from frontmatter lastmod entry. I spent some time searching for something like that, but could not find it. One possible solution might be the footer menu, which show typically an entry "Privacy Policy". But then the date field would be select-able, which is generally not desired. (Well, when thinking about it, a select-able date field, containing a link to diff of latest changes would be an option.) But I would prefer a plain read-only date field, like the "Brought to you by" text at the lower right of each page.
Beta Was this translation helpful? Give feedback.
All reactions