Fix snippets base_path to resolve SVG includes#817
Merged
Conversation
✅ Deploy Preview for nextflow-training ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Nextflow linting complete! ❌ 1 files had 1 errors 💡 Tip: Click filename locations to go directly to that code. View all 1 issues
View formatting changes
|
The pymdownx.snippets extension resolves base_path relative to the current working directory, not the mkdocs.yml location. Added both paths to base_path array: - '.' for CI builds running from repo root - '../..' for local preview running from docs/en/ Fixes empty <figure class="excalidraw"> elements in built docs. Fixes issue introduced in nextflow-io#810 (commit 61c051e)
4fc2f69 to
2c4840d
Compare
Member
Author
|
Deployment preview looks good. The proof of the pudding will be post-merge deployment to the dev version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<figure class="excalidraw">elements)pymdownx.snippetsbase_pathfrom["../.."]to[".", "../.."]Root Cause
The
pymdownx.snippetsextension resolvesbase_pathrelative to the current working directory when mkdocs runs, not relative to the mkdocs.yml file location.When running
mkdocs build -f docs/en/mkdocs.ymlfrom the repo root (as CI does):.(repo root)base_path: ["../.."]resolved to two directories above the repo rootdocs/en/docs/hello_nextflow/img/*.svgcouldn't be foundFix
Changed to
base_path: [".", "../.."]to support both contexts:.for CI builds running from repo root../..for local preview running fromdocs/en/Tested both scenarios - 37 SVG tags correctly included in built HTML.
Fixes issue introduced in commit 61c051e