mkdocs-exporter
mkdocs-exporter copied to clipboard
The path to download pdf is incorrect if configure use_directory_urls to false
trafficstars
Hello! If the use_directory_urls configuration is set to false, the relative path of the PDF becomes incorrect. If I remove the use_directory_urls option and use the default configuration, there are no issues.
For example, if there is a file named docname.md located in docs/sub/docname.md, the generated link is https://[host:port]/docs/faq/docname.pdf, but it should be https://[host:port]/docs/faq/sub/docname.pdf.
use_directory_urls: false
repo_name: faq
repo_url: https://[host.port]/gateway/docs/faq
theme:
name: material
features:
- navigation.indexes
- navigation.sections
- navigation.tabs
- navigation.top
- navigation.tracking
- search.highlight
- search.suggest
- toc.follow
- content.code.copy
- content.code.select
- content.code.annotate
palette:
- media: "(prefers-color-scheme)"
primary: teal
accent: teal
toggle:
icon: material/brightness-auto
name: Switch to light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: teal
accent: teal
toggle:
icon: material/brightness-7
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: teal
accent: teal
toggle:
icon: material/brightness-4
name: Switch to system preference
font:
text: Roboto
code: Roboto Mono
favicon: assets/faq.png
icon:
logo: logo
repo: fontawesome/brands/square-gitlab
plugins:
- progress
- search:
separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
- tags:
tags_file: tags.md
- literate-nav:
nav_file: summary.md
- exporter:
formats:
pdf:
concurrency: 32
enabled: !ENV [MKDOCS_EXPORTER_PDF_ENABLED, true]
buttons:
- title: Download as PDF
icon: material-file-download-outline
enabled: !!python/name:mkdocs_exporter.formats.pdf.buttons.download.enabled
attributes: !!python/name:mkdocs_exporter.formats.pdf.buttons.download.attributes
Hello,
Is there a workaround while the issue is being resolved ?