Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The path to download pdf is incorrect if configure use_directory_urls to false #44

Open
lyx10101010 opened this issue Oct 30, 2024 · 0 comments

Comments

@lyx10101010
Copy link

lyx10101010 commented Oct 30, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant