Closed maneesha closed 2 months ago
See screenshot:
Removing "Ready for Review" label as this feature is not yet working.
ready for review
@AdamChlan I am still seeing the blank space (just like the screenshot above).
Link to netlify preview Link to source
(edit for typo and to add links)
Also, I noticed that before these changes, some widgets were included on all pages. See the layout here.
Now, only explicitly specified widgets are included. Can we have certain widgets appear on all pages? I don't remember discussing this change.
yes, I can revert that change
This has been reverted, and believe I have the rules working as expected
Also for meta to render you need to add a lastmod
parameter with to the front matter like this:
lastmod: 2022-12-11T14:45:08+00:00
OK,thanks. That is what had been missing - I thought the "last modified" data was automatically updated from the file history. Is that possible to do?
@maneesha yes, this has been adjusted.
@AdamChlan by "this has been adjusted" did you mean that it should now automatically use the file's last modified date/time? I am only seeing the meta widget render if the lastmod
parameter is explicitly set.
Also, in the source for the meta widget, it looks like if the date format is not set, it should default to the format 2 April, 2006
.
If I don't have that param set, I am still getting a long date (like Last edited: 15 April, 2023 at 00:00:00 UTC
).
It is also not reading the date correctly. The day and year are interpreted correctly but the month always says April no matter what month I put in. See example in this PR.
@AdamChlan ref month should be January
. Should update the theme's hugo.yaml
file as well.
+ Last edited: {{ dateFormat (site.Params.date_format_with_time | default "2 January, 2006") . }}
- Last edited: {{ dateFormat (site.Params.date_format_with_time | default "2 April, 2006") . }}
This has been updated
It looks like the issue with the date always being April has been fixed.
Also want to check about my question above - does the date have to be manually set in the frontmatter or can it be automatically updated from the file history?
@maneesha To have the modified dates pull in from Github, add the following to your projects hugo.yaml file:
enableGitInfo: true
This will completely automate the process so you will not need to add lastmod to the frontmatter
Setting the enableGitInfo
param seems to work.
I would like this to show just date, not date-time so I'v put in PR #39.
This can be closed once #39 is reviewed/merged.
In the sidebar layout, widgets for
feedback
,meta
, andedit-github
should display (with others defined in the page's frontmatter). The meta widget is not rendering, resulting in two lines with an empty space in between them in the sidebar.