Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically show 'last update' date #1743

Merged
merged 2 commits into from
Feb 4, 2021
Merged

Automatically show 'last update' date #1743

merged 2 commits into from
Feb 4, 2021

Conversation

eldonquijote
Copy link
Contributor

Purpose / why

Automatically show date of last updates on each documentation page. Proof of concept for using Materials theme feature based on plugin.

What changes were made?

Included and activated git-revision-date-localized (https://github.com/timvink/mkdocs-git-revision-date-localized-plugin) plugin for MkDocs. With the plugin active, each documentation page will show a 'last updated' date at the bottom, based on the page's Git revision history.

Important: If you want to test this locally, you must first install the plugin with pip install mkdocs-git-revision-date-localized-plugin, otherwise the build will fail.

Placing the date at the top of the page might involve modifying the Materials theme. It's possible to manually add a variable command showing the date at any location on the page.

Verification

  • Build and test locally
  • Verify/test integration with Travis for automated builds on Github

Interested Parties

@dannylamb @manez @highermath


Checklist

Pull-request reviewer should ensure the following

  • Does this PR link to related issues?
  • Does the proposed documentation align with the Islandora Documentation Style Guide?
  • Are the changes accurate, useful, free of typos, etc?
  • Does this PR update the last updated on date on the documentation page?

Person merging should ensure the following

  • Does mkdocs still build successfully? (This is indicated by TravisCI passing. To test locally, and see warnings, see How To Build Documentation.)
  • If pages are renamed or removed, have all internal links to those pages been fixed?
  • If pages are added, have they been linked to or placed in the menu?
  • Did the PR receive at least one approval from a committer, and all issues raised have been addressed?

@manez
Copy link
Member

manez commented Jan 26, 2021

This looks like a great addition, but I'm not 100% sure I know how to test it. Maybe this is under @highermath 's purview as our designated "Material Theme Expert? 😄

@eldonquijote
Copy link
Contributor Author

Thanks for taking a look! This might warrant more discussion in the DIG. In order to have this feature working for all contributors/testers, everyone who wants to run mkdocs locally to test/work on I8 documentation would need to install an additional Python plugin.

@dannylamb
Copy link
Contributor

@eldonquijote Can we add pip install mkdocs-git-revision-date-localized-plugin to the install instructions here: https://github.com/Islandora/documentation/blob/main/docs/technical-documentation/docs-build.md ?

Other than that, I've tested it and it works great. The date automatically shows up at the bottom of the page.

@manez
Copy link
Member

manez commented Feb 3, 2021

Once this is merged, we'll need a to-do to go clean up the manually added "last updated" lines where we have them. This is a much more elegant solution 👍

@eldonquijote
Copy link
Contributor Author

@dannylamb I've updated the instructions.

@manez I found 10 instances of _last updated .* in the docs folder, should I just go ahead and remove them for this branch?

@dannylamb
Copy link
Contributor

If you're up for it, by all means go ahead and pull them out now.

@eldonquijote eldonquijote merged commit 58ba18c into Islandora:main Feb 4, 2021
@eldonquijote eldonquijote deleted the eldonquijote-adds-last-page-update-date branch February 4, 2021 19:05
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.

3 participants