git-revision-date-localized - Issues and how to fit #8311
-
Hi Guys I have tried to setup the git-revision-date-localized im a MKDOC Material Theme. which is going to my github gh-pages on Github I have added the code into my mkdocs.yam file `plugins: I have also installed pips 3 with
Also Added this to my mkdocs.yml
into one of my md file. I also just tried with this too in the mkdocs.yml: ` plugins:
palette: And on commiting from within Visual studio code to github gh-pages I still get nothing showing up for date posted or updated date. I'm hoping with this post might help me get some more clues on how I can try to get it to work within my pages. Or if there another approach, to getting it to work. I'm not sure if I'm missing to do somthign or if I'm taking the correct ways to be doing this, so be good to see what you all have to say on it. This is what I have coming up on my page! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 34 replies
-
Hi @Atlas-Night-Out, You don't have to add any values manually like I think it would be best for you to pause on your project and first try an example that works. Do a quick:
And the localhost page should show: As for GitHub Pages make sure you enable full fetch: |
Beta Was this translation helpful? Give feedback.
-
Hi kamilkrzyskow Is there any way I can fix my Project? If I do a test one after? Has I don't want to be messing with setting up more stuff to confuse me further. The way I did at the start was hard to get set up as mkdocs did not want to upload my very old files and into GitHub, took me a month to figure out the way I have done it and it's more or less the same as you have done above, except I never used pip install uv The variables, as you mentioned, I never installed anything; I was only trying to see if anything would come up to show the date. But again, like you say, it's supposed to just work. so there must be something missing, but I have no clue what could be missing. The place I got the variables from is this link. https://timvink.github.io/mkdocs-git-revision-date-localized-plugin/available-variables/ I will try to do a test like you mentioned, but I'm not at all fast at doing this! Takes me a long time to just do the simplest of things 👍 When you say do a Quick git clone test, where do I do it from? in Git bash as Im on a windows pc |
Beta Was this translation helpful? Give feedback.
-
My setups are a lot different from the way you do things, too, so this will only confuse me more on trying to get this to work. |
Beta Was this translation helpful? Give feedback.
-
Let's continue here after the commend with the video: Since now you've go a working example. ✅ theme:
name: material
# ...
plugins:
- search
- git-authors:
exclude:
- index.md
- git-revision-date-localized:
type: timeago
timezone: Europe/Amsterdam
locale: en
fallback_to_build_date: false
enable_creation_date: true ❌ theme:
name: material
# ...
plugins:
- search
- git-authors:
exclude:
- index.md
- git-revision-date-localized:
type: timeago
timezone: Europe/Amsterdam
locale: en
fallback_to_build_date: false
enable_creation_date: true I recommend enabling white space indication in the Visual Studio Code settings, but I don't know how much the dots would distract you. |
Beta Was this translation helpful? Give feedback.
-
Here's a better plugin document-dates, with more features, higher performance, better compatibility and easier to use, you can try it! |
Beta Was this translation helpful? Give feedback.
As mentioned in the other comment:
Your issue is the indent,
plugins
undertheme
won't be loaded by MkDocs. So select multiple lines and press Shift + Tab to de-dent the lines.Using the files from the git localized repository would install mkdocs-material, in the
uv run mkdocs serve
stepI didn't ask you to create a new project from scratch, and instead to test an already working example.