timvink / mkdocs-git-revision-date-localized-plugin

MkDocs plugin to add a last updated date to your site pages
https://timvink.github.io/mkdocs-git-revision-date-localized-plugin/index.html
MIT License
193 stars 39 forks source link

How to update git-revision-date-localized.json? #93

Closed EDIflyer closed 2 years ago

EDIflyer commented 2 years ago

Have been playing about with changing the display date based on the examples at https://timvink.github.io/mkdocs-git-revision-date-localized-plugin/options/

I was a bit confused by the example first as custom date wasn't being displayed and there were VS Code errors in the schema check: image

It turns out I had a to change the type to custom for it to make use of the custom format. It looks like the schema needs a couple of additions, both to add custom to type and to recognise custom_format as a permissible variable. I couldn't find it in the repo though so wasn't quite sure where to suggest changes?

timvink commented 2 years ago

I wasn't aware of this schema check actually. Interesting.

It seems @squidfunk contributed this in https://github.com/squidfunk/mkdocs-material/blob/3ea15d73790b0623df6a6c3153ad98f3ef687cb4/docs/schema/plugins/external/git-revision-date-localized.json

@squidfunk is there a way to move git-revision-date-localized.json to this repository so I can maintain it here for the options offered? Can you give me some pointers / docs on how this works?

EDIflyer commented 2 years ago

@timvink yes I spotted it mentioned here - https://squidfunk.github.io/mkdocs-material/creating-your-site/#configuration - works really well for catching issues before you save the mkdocs.yml file 😃

image

Thanks for working out where it was in the repo - have forked and created a PR 👍

EDIflyer commented 2 years ago

@squidfunk have created a PR to tweak the specific bits I found in case helpful!

squidfunk commented 2 years ago

I'd be happy to outsource maintenance of the plugin typings. When you finished the typings, we can switch to the typings provided by your repository here – just PR the URL hosting the JSON schema.

timvink commented 2 years ago

@EDIflyer thanks for the PR @squidfunk I've moved schema.json to this repository, thanks for the pointer.