Skip to content

show_source displaying absolute paths when publishing #582

Closed Answered by pawamoy
cpvannier asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

When showing the source, we compute the path to the file relatively to the current working directory. So when you serve from within your project, it works fine, but when you deploy from another project, the relative path cannot be computed anymore, and the absolute path is used instead.

The next version of MkDocs comes with the ability to specify a path as relative to the config file (or docs dir, or current page), so we should then be able to add an option to Griffe to specify the base path using this. Relative paths will then always be computed relatively to this base path.

In the meantime, if you're willing to override templates (which I don't really recommend doing until we have p…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@cpvannier
Comment options

@pawamoy
Comment options

Answer selected by cpvannier
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants