-
Notifications
You must be signed in to change notification settings - Fork 17
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
Variables don't get resolved in Snippets #45
Comments
Hey there thanks for your interest.
Off the top of my head try
- markdownextradata: {}
Becomes
- markdownextradata
Hope that helps. Been a while since ive worked on this app!
…On Fri, 17 Feb 2023 at 22:04, Stephan H. Wissel ***@***.***> wrote:
I'm using your nice plugin together with the pymdownx.snippets plugin
I have
extra:
test: 1.0.0plugins:
- search
- awesome-pages
- section-index
- tags
- markdownextradata: {}
and a test.md
# Test of extras
This is top: {{test}}
--8<-- "snippet.md"
End
and a snippet.md
In the snippet: {{test}}
Expected outcome
<h1>Test of extras</h1>
This is top: 1.0.0
In the snippet: 1.0.0
End
Actual outcome
<h1>Test of extras</h1>
This is top: 1.0.0
In the snippet: {{test}}
End
What do I miss?
—
Reply to this email directly, view it on GitHub
<#45>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADA6MXCT6JXMNTLMKH2HXDWX5LNNANCNFSM6AAAAAAU7JLO3I>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Tried that too. I suspect it might be the sequence of plugins. Mkdocs is particular about it. I'll experiment and report back |
Played with various combinations of plugin and markdown extension sequences to no success. Interesting observation: when I load |
Thanks for the feedback.
Would you kind sending your yaml and I’ll try replicate and fix when I get
a second?
Best
…On Sat, 18 Feb 2023 at 16:41, Stephan H. Wissel ***@***.***> wrote:
Played with various combinations of plugin and markdown extension
sequences to no success.
I also renamed in one attempt the snippet directory to .snippet so it
would be first in the directory list.
Interesting observation: when I load snippet.md directly from the URL, it
works as expected and variables are resolved. Looks to me like a lifecycle
issue where the snippet plugin ignores the markdownextradata.
—
Reply to this email directly, view it on GitHub
<#45 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADA6MTSSHMLI67SXDBMBS3WYBOJTANCNFSM6AAAAAAU7JLO3I>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Here you go: #Project Information
site_name: MKDocs Test
site_url: https://github.com/
site_description: >-
A test
use_directory_urls: false
# Theme Configuration
theme:
name: material
language: en
features:
- navigation.tabs
- navigation.indexes
- navigation.top
- navigation.instant
- search.highlight
- search.share
- search.suggest
#custom_dir: theme_overrides/
icon:
repo: fontawesome/brands/github
font:
text: Roboto
code: Roboto Mono
favicon: favicon.ico
# Static files
static_templates:
- 404.html
# Markdown Extensions
markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- attr_list
- pymdownx.tabbed:
alternate_style: true
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.snippets:
base_path:
- "docs/snippets"
extra:
test: 1.0.0
plugins:
- markdownextradata
- search
- awesome-pages
- section-index
- tags
|
I'm using your nice plugin together with the
pymdownx.snippets
pluginI have
and a
test.md
# Test of extras This is top: {{test}} --8<-- "snippet.md" End
and a
snippet.md
Expected outcome
Actual outcome
What do I miss?
The text was updated successfully, but these errors were encountered: