Comments (6)
Hi @michalzobec. Good to hear it's useful for you!
So if I understand correctly, you would like the revision date to be based off of a page meta variable like PublishedDate
, instead of the last git commit on a file?
The date would have to be in ISO8601 format, and the variable name to look for should be configurable in the config.
Could be useful, but not sure if it fits in the scope of the plugin (which is revision-date based on git). I'll think about it, and also wait and see if some users upvote the issue.
from mkdocs-git-revision-date-localized-plugin.
Hello @timvink
thank you for your fast reply :)
So if I understand correctly, you would like the revision date to be based off of a page meta variable like
PublishedDate
, instead of the last git commit on a file?
sorry, no. I need use both, your information, and my information (variable).
your plugin inserts information about last update. my variable inserts the date of first publish of same article.
for examle:
Published: <some date here>
Last update: <some date here>
Last update is your information from your plugin.
Published is my information from my variable in same article.
Here is real example: https://pomoc2.zobecdev.cz/testpage/
you will found on begin of page:
Vydáno: 01.12.2020 14:00:00
Změněno: 27. února 2021 22:38:39
It is clear for you now? :)
The date would have to be in ISO8601 format, and the variable name to look for should be configurable in the config.
yes, I understand that. :)
Have nice day.
Michal
from mkdocs-git-revision-date-localized-plugin.
Oh I see. The {{ page.meta.git_revision_date_localized }}
tag has been embedded into mkdocs-material
(see https://github.com/squidfunk/mkdocs-material/blob/master/material/partials/source-date.html), which is why you don't need an override for that one.
Using overrides is the preferred way to go. You can improve your setup by overriding the source-date.html
instead of main.html
, which will make your customization much more stable (as mkdocs-material's main.html
is updated much more frequently, meaning you will have to update your override more often).
from mkdocs-git-revision-date-localized-plugin.
yeah, but if you add you support for custom meta variable (to your plugin), I do not must use override. and that's why I asked you, for exactly the reasons you're giving. so that I don't have to deal with customizations at all and have problems with upgrades.
from mkdocs-git-revision-date-localized-plugin.
Initially to use this plugin's {{ page.meta.git_revision_date_localized }}
with mkdocs-material
theme, you also needed to use an override. Because so many people use this plugin, I was able to convince the author of mkdocs-material
to update his template to include it.
If you want support for your PublishedDate
variable inside mkdocs-material
, you will have to open an issue in that repository. Overriding partials is the preferred way of extending a theme, and mkdocs-material
providing the very specific partials/source-date.html
makes it really easy already. But if you can make a strong case in an issue to mkdocs-material perhaps you will be able to convince the author.
from mkdocs-git-revision-date-localized-plugin.
ahh, okay, thanks :)
from mkdocs-git-revision-date-localized-plugin.
Related Issues (20)
- Unable to set any configurations HOT 12
- Typo in variable names HOT 2
- The plugin breaks with the last mkdocs docker image HOT 3
- The plugin breaks with squidfunk/mkdocs-material:9.0.3 HOT 1
- Is there a way to turn off warnings? HOT 4
- Improve error message for dubious git ownership HOT 2
- if a file has no git logs, use the last modified timestamp instead of the current HOT 4
- which themes will this plugin work?
- Feature request: exclude specific commits when calculating the 'last update' calculation HOT 3
- Poor performance on large monorepos HOT 3
- Timeago setting results in incorrect items being added to extra_javascript HOT 2
- Create date not correct on Github pages HOT 4
- Document how to use sparse checkouts
- correctly populate `lastmod` of `sitemap.xml` HOT 2
- DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version HOT 1
- Cloudflare Pages fetch-depth HOT 6
- 1.2.3 breaks integration with Material for MkDocs HOT 5
- Whitelist / Negate certain excludes with a `!`? HOT 1
- Feature Request: Show datetime on hover when using timeago
- DeprecationWarning when using Mldocs Material 9.5.20 and Mkdocs 1.60 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkdocs-git-revision-date-localized-plugin.