Migrating from older names¶
The project has had three names. Every older way of using it keeps working for one major version.
| Name | Versions | Status |
|---|---|---|
mkdocs-asyncapi-tag-plugin |
0.x, 1.0.0 shim | Archived on PyPI; the 1.0.0 shim installs asyncapi-tag |
asyncapi-tag |
1.0, 1.1, 1.2.0 shim | Deprecated; the 1.2.0 shim installs asyncapi-viewer |
asyncapi-viewer |
1.2 onwards | Current |
From asyncapi-tag (1.0 and 1.1)¶
- Replace
asyncapi-tagwithasyncapi-viewerin your requirements. Upgradingasyncapi-tagto 1.2.0 also works, since it is now a shim that depends onasyncapi-viewer. - Nothing else is required. These old names are still registered and accepted:
the MkDocs plugin id
asyncapi-tag, the Markdown extension nameasyncapi_tag, the<asyncapi-tag>element, and the importasyncapi_tag(with aDeprecationWarning). - When convenient, switch to
asyncapi-viewerinmkdocs.yml,asyncapi_viewerinmarkdown_extensionsand<asyncapi-viewer>in pages. The old names will be removed in 3.0. - Default container ids changed from
asyncapi-tag-Ntoasyncapi-viewer-N. Containers carry both theasyncapi-viewerandasyncapi-tagclasses, so custom CSS keeps applying; if you link to a default id, setidexplicitly instead.
From mkdocs-asyncapi-tag-plugin (0.x)¶
- Replace it with
asyncapi-viewer. The plugin id inmkdocs.yml(asyncapi-tag) still works. - Remove the
asyncapi_fileplugin option. MkDocs already copies every non-Markdown file underdocs/into the site; the option now only prints a deprecation warning. - Use a path relative to the page, or a
/-prefixed path relative todocs/, insrc. Earlier versions emitted the build machine's filesystem path, so only/-prefixed paths ever worked. - String attributes such as
publishLabel="PUBLISH"andshowServers="bySpecTags"now take effect. Earlier versions silently discarded them, so check pages that set them.
What 1.0.0 fixed over 0.9.0¶
- 0.9.0 emitted JavaScript with a syntax error, so the viewer never rendered.
- YAML documents did not work despite the README saying so.
- The viewer was loaded from
unpkg.comat@latestwith no integrity hash, and its stylesheet was never loaded. - The viewer was appended to the end of the page instead of where the tag was, and only the first tag per page was handled.
- Attribute values were interpolated unescaped into a JavaScript string.