-
Notifications
You must be signed in to change notification settings - Fork 35
feat: Added Git Credentials in Footer and Open issue in Header #182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @PriyanshuRj, thanks for your solution. There are a few more improvements I would like to see included in your solution:
- This solution is only able to get the latest commit on the repo, It would be nice to see this information based on the page that you are on. Most times, the page that you are viewing will not have been modified in the last commit.
- I would rather this information be part of the hugo build process, this would allow this information to be served statically instead of through a client side script (much faster loads and no unnecessary api calls to GitHub).
It may be helpful to see what kind of Git information is already included in Hugo: https://gohugo.io/variables/git/#readout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but to avoid code duplication please put your work into the main/footer partial.
The file is at layouts/partials/main/footer.html
Actually, the git variables are not accessible in the partials so we need to pass them down which will also create extra code. |
Ah you are correct, the partial call doesn't have the context being passed down.
This partial didn't have the context being passed, since it didn't need it prior to now. |
Thanks got it. |
Amazing work @PriyanshuRj :) |
- What I did
fixes #22
I created a Link to open an issue on the atsign documentation repository and added details for the last commit in the footer as specified.
Last updated on <date>
By <author> in <short commit id>
(commit id can link to the commit in GitHub)- How I did it
- How to verify it
After running the Documentation site on localhost, you can check the header and the footer of the site to verify the same.
- Description for the changelog
Updated the header of the site to add a open issue features and added details of last commit in the footer.