Skip to content

Update yaml schemas#7464

Closed
FredZinelli wants to merge 12 commits intosquidfunk:masterfrom
FredZinelli:master
Closed

Update yaml schemas#7464
FredZinelli wants to merge 12 commits intosquidfunk:masterfrom
FredZinelli:master

Conversation

@FredZinelli
Copy link
Copy Markdown
Contributor

@FredZinelli FredZinelli commented Aug 19, 2024

Hello,

I updated a bunch of yaml schemas, fixing some missing configs, and adding some new elements related to projects of mine on the way.

Fix / update:

  • schema.json : edit_uri_template was missing
  • schema/pluigins:
    I added all the material/plugin syntaxes to each of your plugins, because I built a new theme extending yours, pyodide-mkdocs-theme (related question). So, I moved the object version in $defs and rewrote of the "oneOf" array, with 4 versions:
    • const: plugin
    • const: material/plugin
    • object: plugin: to $defs
    • object: material/plugin: to $defs
      This fixed on the way some inconsistencies (at least one: the group plugin didn't have any const version, while it's talked about in material's docs)

Add

  • theme.json : added const: pyodide-mkdocs-theme. This one is up to you, if you don't want to add it there, no problem on my side
  • plugins.json : this is the main reason for this PR I added 2 external refs for 2 of my projects: the plugin coming with my theme, pyodide_macros, and an older project of mine, mkdocs-addresses (the schema for this one is only a working stub, I didn't create the full config yet).

Hoping you'll be ok with the changes.

Kind regards,
Fred


PS: I still have one red line in my mkdocs.yml, but didn't find a way to fix it:

  - pymdownx.tabbed: # Volets coulissants.  === "Mon volet"
      alternate_style: true   # compatibilité pour mobiles
      slugify: !!python/object/apply:pymdownx.slugs.slugify   # <<<< here
        kwds:
          case: lower

I saw the tags you used for emojis or superfences in the config of the vscode yaml extension, but I don't get what they actually are about and couldn't make something equivalent to work with the tabbed extension. No idea how this actually work...
It's not a problem, I'm just pointing it out, in case you know how to fix it on the way...

@FredZinelli
Copy link
Copy Markdown
Contributor Author

Oh dear...! I just saw the markdownDescription field I added is static and always refer to the search plugin... x/
Lemme update these...

Copy link
Copy Markdown
Contributor Author

@FredZinelli FredZinelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, looks better this time... :/

Comment thread docs/schema/plugins/blog.json Outdated
Comment thread docs/schema/plugins/blog.json Outdated
Comment thread docs/schema/plugins/blog.json Outdated
Comment thread docs/schema/plugins/blog.json Outdated
Comment thread docs/schema/plugins/group.json Outdated
Comment thread docs/schema/plugins/tags.json Outdated
Comment thread docs/schema/plugins/typeset.json Outdated
Comment thread docs/schema/plugins/typeset.json Outdated
Comment thread docs/schema/plugins/typeset.json Outdated
Comment thread docs/schema/plugins/typeset.json Outdated
@FredZinelli
Copy link
Copy Markdown
Contributor Author

(Sorry for the noisy commits, I'm not used to github management/PR... 'x) )

I _finally_ found the batch tool...

(note to self: don't create PRs at midnight...)
@squidfunk
Copy link
Copy Markdown
Owner

Thanks for the PR and for all your work. However, 1,444 lines changed – it's impossible for us to review this. There are definitely some things that make no sense to merge from our perspective, for example the group plugin cannot have a non-object syntax, because it just makes no sense. It would be a no-op. Additionally, combining material/x and x into one should be possible with patterns. We can't just merge a change this large, because it will impact all of our users that use the schema as an aid in their IDEs, and dissecting and discussing it will take too much effort.

Please cut this PR into several smaller PRs, e.g., those that just add missing MkDocs settings, and those that do fundamental changes, so they can be separately discussed and tested. You do not need to make a PR for each change introduced, but group them logically, so they are easy to reason about. Please try to make those PRs self-contained and easy to reason about, then we can think about merging them.

Closing, as this is not possible to merge.

@squidfunk squidfunk closed this Aug 20, 2024
@FredZinelli
Copy link
Copy Markdown
Contributor Author

FredZinelli commented Aug 20, 2024

Ok, no problem. I'll get back to you with something more concise.


edit:

the group plugin cannot have a non-object syntax, because it just makes no sense

Oh, I got misled by this page, then:
image

Seeing no colon, I thought it could be used as a "non object" like search.

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.

2 participants