backstage / mkdocs-techdocs-core

The core MkDocs plugin used by Backstage's TechDocs as a wrapper around multiple MkDocs plugins and Python Markdown extensions
Apache License 2.0
83 stars 61 forks source link

chore(deps): update mkdocs-material to v8.5.9 #101

Closed ruarfff closed 1 year ago

ruarfff commented 1 year ago

This change also required updating pygments to v2.12 and pymdown-extensions to v9.8.

A lot of new features have been added to mkdocs-material since 8.1.

In 8.2 we got:

We use tags a lot in our company, and it was a pain point migrating our mkdocs into backstage. We have a workaround, installing the newer version of mkcdocs-material in the backstage Dockerfile. Still, it is harder to have a good local setup for repos that want to use the techdocs plugin with mkdocs-material.

In 8.3 we got:

In 8.4 we got:

In 8.5 we got:

If this update could be added, it would make our lives much easier. We have tested this on our instance of backstage and have not identified any breaking changes.

Thank you!

StephaneRob commented 1 year ago

I also tested to update mkdocs material, mainly to use mermaid instead of kroki. To make it work, I had to remove pymdownx.extra from markdown_extensions (conflict?)

https://github.com/StephaneRob/mkdocs-techdocs-core/commit/480258c3c237aea0562dd369c808d9abd2107583

askreet commented 1 year ago

There's interest in native support for Mermaid at my company, hope to see this land soon.

ruarfff commented 1 year ago

I also tested to update mkdocs material, mainly to use mermaid instead of kroki. To make it work, I had to remove pymdownx.extra from markdown_extensions (conflict?)

StephaneRob@480258c

I am not sure @StephaneRob. I did not encounter any issues that required that change. What was the issue you saw? Do you have some way to reproduce it?

I have been using this library version, and it worked on my sites without needing further modifications. If you have a setup I should test with please let me know.

StephaneRob commented 1 year ago

@ruarfff looks like the JS to initialize mermaid graph is not executed in Backstage context. I had to create a custom addon (TechDocsAddonLocations.Content) to initialize them. I have to retry with pymdownx.extra to see if i can initialize mermaid correctly.

agentbellnorm commented 1 year ago

@ruarfff, I'll close this PR since #109 was merged!

ruarfff commented 1 year ago

Thank you @agentbellnorm :)