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
89 stars 63 forks source link

Changing admonition icon set not working #172

Open 5nafu opened 8 months ago

5nafu commented 8 months ago

We are currently trying to change the admonition icons as explained in the material theme documentation.

Our mkdocs.yaml looks like this:

site_name: '...'
site_description: '...'
#uncomment the below lines if you want to enable the edit button in your techdocs
edit_uri: blob/main/docs/ #don't change it, just uncomment
repo_url: '...'
theme:
  name: material
  palette:
    scheme: default
  features:
    - toc.follow
    - navigation.indexes
    - content.code.copy
    - content.code.annotate
  icon:
    admonition:
      example: fontawesome/solid/flask
plugins:
  - techdocs-core
  - awesome-pages
markdown_extensions:
  - pymdownx.highlight:
      anchor_linenums: true
      line_spans: __span
      pygments_lang_class: true
  - pymdownx.inlinehilite
  - pymdownx.snippets
  - pymdownx.superfences
  - admonition
  - pymdownx.details
  - mdx_truly_sane_lists:
      nested_indent: 4

Unfortunately, the icons stay the same when we try to run a preview of the documentation with npx @techdocs/cli serve. If we switch to mkdocs (mkdocs serve) directly, the icons work as expected.

We found an issue squidfunk/mkdocs-material#3987 suggesting that removing the palette setting might solve the issue, but this did not help in out case.

vishes-shell commented 7 months ago

@5nafu sorry to interrupt, it's not really about changeing admonition icom.

Have you managed to make annotate working within backstage instance?

i have:

i really want to make it work within backstage...

daneah commented 5 months ago

@vishes-shell According to #128 code annotation isn't supported for (understandable) deeper architectural reasons, but I am curious as well.

vanchaxy commented 1 month ago

@vishes-shell @daneah I have updated #128 with a solution for annotation support if you are still interested