Sort out directory URI config

This commit is contained in:
Victor Zverovich 2024-06-02 09:47:52 -07:00
parent 509d018101
commit dab1a65d2c
3 changed files with 6 additions and 5 deletions

View File

@ -443,6 +443,7 @@ function(add_doc_target)
COMMAND
${CMAKE_COMMAND} -E env PYTHONPATH=${CMAKE_CURRENT_SOURCE_DIR}/support
${MKDOCS} build -f ${CMAKE_CURRENT_SOURCE_DIR}/support/mkdocs.yml
--no-directory-urls
SOURCES ${sources})
include(GNUInstallDirs)

View File

@ -4,9 +4,6 @@ docs_dir: ../doc
repo_url: https://github.com/fmtlib/fmt
# Make the docs work locally without a server.
use_directory_urls: false
theme:
name: material
features:

View File

@ -3,9 +3,12 @@
import os, subprocess, sys
dirname = os.path.dirname(__file__)
# Set PYTHONPATH for the mkdocstrings handler.
env = os.environ.copy()
path = env.get('PYTHONPATH')
env['PYTHONPATH'] = (path + ':' if path else '') + os.path.dirname(__file__)
env['PYTHONPATH'] = (path + ':' if path else '') + dirname
subprocess.run(['mkdocs'] + sys.argv[1:], env=env)
config_path = os.path.join(dirname, 'mkdocs.yml')
subprocess.run(['mkdocs'] + sys.argv[1:] + ['-f', config_path], env=env)