You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One objective of the Python guide is to provide executable code examples in separate Python scripts. At the same time, the code examples should also be shown in listings in the guide.
Problem: Markdown itself does not allow to include other files, i.e., such as the code examples.
Proposal: To avoid duplicating the code of the scripts in the markdown files, we can use Jekyll's include_relate primitive [1] to include the scripts in the rendered guide.
Gut feeling tells me that Jekyll appears to me a little to flexible with a potential for injection via variables. Haven't tried.
Editing requires to compile and run a web-server. Was somewhat hoping for a more simplistic solution.
One objective of the Python guide is to provide executable code examples in separate Python scripts. At the same time, the code examples should also be shown in listings in the guide.
Problem: Markdown itself does not allow to include other files, i.e., such as the code examples.
Proposal: To avoid duplicating the code of the scripts in the markdown files, we can use Jekyll's
include_relate
primitive [1] to include the scripts in the rendered guide.Specifically, this pattern seems to work:
[1] https://jekyllrb.com/docs/includes/#including-files-relative-to-another-file
cc @myteron @tommcd
The text was updated successfully, but these errors were encountered: