Skip to content
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

Include external document #301

Closed
xgouchet opened this issue Jul 27, 2017 · 5 comments
Closed

Include external document #301

xgouchet opened this issue Jul 27, 2017 · 5 comments

Comments

@xgouchet
Copy link
Contributor

xgouchet commented Jul 27, 2017

One feature that would be nice would be the ability to include an external markup document.

Much like we can include an image using
![Title](path/to/image.ext)

We could have a
@[Title](path/to/document.md)

The proposed syntax can be adapted, but this would splitting a document in multiple files and reorder sections easily.

@xgouchet
Copy link
Contributor Author

The [Title] could be used if the referenced document is not found to insert the title as a <a href="path/to/document.md">Title</a>, maybe styling it in red to mark it as not found ?

@xgouchet
Copy link
Contributor Author

I tried to play with the markdown_include.include extension, which kind of works, but the path of the included file must be provided relative to the path of the working dir (in which retext is launched), and not the path of the parent document.

@mitya57
Copy link
Member

mitya57 commented Sep 30, 2017

With the latest version in master markdown_include should be working, please test.

@xgouchet
Copy link
Contributor Author

Wow it works ! Amazing thanks a lot !

@xgouchet
Copy link
Contributor Author

So to sum up, just include the following code and it works!

<!-- Required extensions: markdown_include.include -->

{!included_document.md!}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants