-
Notifications
You must be signed in to change notification settings - Fork 200
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
support prolog (& epilog) content #190
Comments
It would also be idea to offer it as a template like construct, similar to https://nbsphinx.readthedocs.io/en/0.3.0/prolog-and-epilog.html, such that one could adjust the behaviour based on variables like the docname |
Although not specifically addressed, #273 provides a close solution to this, for example: in conf.py
then in each file you would add at the top
|
wait where is this EDIT: nvm I read this issue before seeing the others about substitution syntax being added, will comment there |
I've tried this with a substitution that contains a code-cell directive. Am I doing something wrong if that results in this kind of warnings?
If using a code-cell simply isn't supported atm, is there a workaround? |
This might not be the correct place to ask, but can substitutions like |
Heya, no not directly, since they have completely different "contexts", i.e. the dictionary that maps the variables to their values. So maybe you could try something like this in your conf.py myst_substitutions = {"a": "b"}
html_context = {"myst": myst_substitutions} then use |
@chrisjsewell Thanks! This makes sense and is probably the right thing - I realize I was abusing |
cheers! |
Not ideal when you have about thousand files in your documentation... |
It does not look liket myst_substitutions have been initialized when these get parsed. See executablebooks/MyST-Parser#190 --HG-- branch : solutions
Originally posted by @SG-phimeca in #188 (comment)
This would be similar to https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-rst_prolog. An important difference though would be that the content should be injected after any YAML front matter (perhaps there could also be a separate option to add to this front matter)
The text was updated successfully, but these errors were encountered: