Skip to content

Snippets not rendering. #1185

Discussion options

You must be logged in to vote

One of the issues I'm seeing is the fact that you are not referencing your snippets properly.

For instance, consider this example:

## Command line arguments

--8<-- "cli-manage-agentconfig.md"

It should be:

## Command line arguments

--8<-- "docs/cli-manage-agentconfig.md"

Why is this wrong? Because snippets looks at all files relative to whatever you have configured as your base path via the base_path option. I see you have not set this option, so the default is ..

You might assume that your current working directory is docs when using mkdocs, but it is not, it is the root of your project where you are running mkdocs from. So to access files in docs you have provide a path relative fro…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by facelessuser
Comment options

You must be logged in to vote
0 replies
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
Converted from issue

This discussion was converted from issue #1185 on December 24, 2020 18:38.