-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add ability to show tag/commit/dirty #99
Comments
Not a bad idea. We're accessing git info anyway, and might as well expose a couple of extra variables from git while we're at it. Although it's clearly beyond the scope of the revision date. I've been hesitant to add more git info before, as there's overlap with Currently, we have this list: https://timvink.github.io/mkdocs-git-revision-date-localized-plugin/available-variables/ . Adding some extra git variables for developers to use while extending their themes doesn't hurt ease of use for normal users, doesn't hurt performance and makes certain customizations easier. Would you be willing to make a PR ? |
Btw, came across this plugin which is related: https://github.com/agarthetiger/mkdocs_latest_release_plugin |
Hi, I stumbled upon this issue when looking for a similar functionality -- I too, would like to display git SHA corresponding to the current mkdocs site build (useful for tracing back to what the state of the repository is when the doc was generated). I think it is tangentially related to "git revision date" (as a git SHA does correspond to a particular repository state at a particular point in time). More so than git authors/committers, at least :) I take it from the previous reply in the thread that this change is still welcome? @timvink I could try to formulate a PR if so. |
Hi @thatlittleboy, I appreciate the offer! There are quite some plugins that retrieve information from the I've started work on a new plugin, https://github.com/timvink/mkdocs-git-info-plugin, which will take care of extracting all the relevant git info and exposing all the git variables. With mkdocs 1.4 it becomes much easier to share state across plugins, so this plugin can be used by other plugins also. I still need to design how the variables will be stored, but once the design is there, I'll create some issues and would appreciate any help there. The whole thing is a low-priority hobby project so don't expect big things soon ;) |
This is a great tool to show users when the docs were last updated, but it would be exceptionally helpful to be able to embed the version/tag if available, falling back to head commit and an indicator if the workspace is dirty.
The examples below can only be attempted after confirming
.git
exists.e.g.
The text was updated successfully, but these errors were encountered: