mkdocs-with-confluence icon indicating copy to clipboard operation
mkdocs-with-confluence copied to clipboard

Interaction with other plug-ins?

Open jmpicnic opened this issue 1 year ago • 2 comments

First, thanks a lot for publishing this plugin, it does work with confluence quickly and with no trouble at all.

My challenge is how to get it to interact with other mkdocs plugins for some more advanced rendering. When generating the confluence pages, it seems that the underlying renderer (md2cf/mistune) does not take them into account.

I am using this in the mkdocs.yml file:

[...]
# See https://squidfunk.github.io/mkdocs-material/reference/code-blocks/
theme:
  name: material
  features:
    - content.code.annotate

markdown_extensions:
  - tables
  - def_list
  - admonition
  - toc
  - markdown_inline_graphviz
  - plantuml_markdown
  - mdx_truly_sane_lists
# See https://squidfunk.github.io/mkdocs-material/reference/code-blocks/
  - pymdownx.highlight:
      anchor_linenums: true
      line_spans: __span
      pygments_lang_class: true
  - pymdownx.inlinehilite
  - pymdownx.superfences
  - pymdownx.smartsymbols
  - pymdownx.arithmatex:
      generic: true
  - pymdownx.snippets:
      check_paths: true

plugins:
  - monorepo
  - search
  # https://github.com/pawelsikora/mkdocs-with-confluence
  - mkdocs-with-confluence:
      host_url: https://flexport.atlassian.net/wiki/rest/api/content
      space: !ENV CONFLUENCE_SPACE
      parent_page_name: !ENV CONFLUENCE_PARENT_PAGE
      username: !ENV CONFLUENCE_USER
      password: !ENV CONFLUENCE_TOKEN
      enabled_if_env: MKDOCS_TO_CONFLUENCE
      verbose: false
      debug: false
      dryrun: false

And the rendered pages don't render correctly at least:

  • plantuml
  • snippets
  • admonitions
  • math (MathJax)

Which are all rendered O.K. when generating an html site.

Any ideas would be very appreciated.

jmpicnic avatar Mar 13 '23 23:03 jmpicnic

any solution for pages don't render correctly?

afer4152 avatar May 11 '23 05:05 afer4152

I have similar issue I am using mkdocstrings plugin to generate docs, which are rendered properly for html but plugin publishes the page without it so my confluence page look like this

# Example Module

::: exampleModulePy

kha7iq avatar Jun 20 '23 06:06 kha7iq