Skip to content

Conversation

@daniseijo
Copy link

@daniseijo daniseijo commented Oct 9, 2025

Description

Using the git info that the app already uses to show the last modified date, I have added the last person that modified the page also. This is very util for us when checking who to ask for information about that part of our documentation

image

How to use it

To activate the feature, I have added a new flag called displayUpdatedAuthor

NOTE: I just translated the languages that I know, I might need some help to translate the by in the phrase: Last updated on {{date}} by {{author}}

Thanks for the great work with this template!

@netlify
Copy link

netlify bot commented Oct 9, 2025

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit 931d33e
🔍 Latest deploy log https://app.netlify.com/projects/hugo-hextra/deploys/69009817cfb4de0008b96e19
😎 Deploy Preview https://deploy-preview-857--hugo-hextra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@@ -1,9 +1,18 @@
{{- $lastUpdated := (T "lastUpdated") | default "Last updated on" -}}
{{- $by := (T "by") | default "by" -}}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be easier to format and translate without using "by" since different languages express authorship differently

For example:
• Last updated on 2025-10-11 • Jane Doe
• Last updated on 2025-10-11 — Jane Doe

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about a mix?

For the languages that can handle it, add a translation. For the other ones, just add • or — as the default and show it when no translation is available:

Suggested change
{{- $by := (T "by") | default "by" -}}
{{- $by := (T "by") | default "" -}}

WDYT?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that sounds good.

ideally this should be templated, but we don't have to do it right now

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, finally I left the dot because for languages without translation, it was using English as the default, and not the default string as I suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants