Open orencio opened 1 year ago
This is related to #3206.
It says:
Basically, this is how it works now:
- Get the post source
- Replace the shortcodes with placeholders
- Process with docutils or whatever compiler
- Replace the placeholders with the HTML generated by the shortcodes
Perhaps the process should be:
Is this correct?
The replacement-with-placeholders step must happen before compilation, because a compiler might mess up the contents of your shortcodes (eg. replace foo_bar_baz
with foo<em>bar</em>baz
).
What could be done in this specific case is this: when processing include
reST directives, the included source code should undergo the placeholder replacement, and the generated placeholders/shortcodes should be added to the main post’s replacement list (as if they were in the main post).
This would require:
If anyone wants to have a go at implementing this, we'll be happy to accept a pull request.
(Closed by mistake.)
I would like this behavior.
Environment.
Description.
Trying to include other rst file doesn't reder shorcodes:
This doesn't render raw shortcode, only include the text as it is:
{{% raw %}} <span class="logo"/> {{% /raw %}}
.I think the problem is that Nikola only render shortcodes of the main rst file and not of the included files.
Although include directive (https://docutils.sourceforge.io/docs/ref/rst/directives.html#including-an-external-document-fragment) permits specify
parser
parameter. If this parser may be Nikola Parser, the problem should be resolved. Something like this:Is there anyway of render includes files?
Regards.