RestructuredText .. include:: directive.

Michael Forbes avatarMichael Forbes created an issue

It would be nice if the reST processor could parse .. include:: directives. The use-case is allowing one to factor out a set of links and replacements (I like to keep them in a top-level .links.rst file) so that one can freely use them in various .rst files throughout a project without having to redefine them in each file.

(It would actually be nice to be able to include a set of links from the web so that I only have to maintain one set, but this is probably a security problem, which is probably why ReStructuredText does not permit.)

Comments (3)

  1. Jesper Nøhr

    You are correct: This is indeed disabled for security purposes. We use docutils for rST, and it does not permit sandboxing includes. If we had it on, it would be a giant security risk.

  2. peterjc

    This blocks my intended usage of BitBucket for hosting a tutorial (*.rst files) including code blocks (e.g. little *.py scripts), potentially along with sample output (e.g. little *.txt files or images). But at least thanks to this bug report I know why it isn't working - thanks.

    Matching issue on GitHub:

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.