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" extenal content #226

Closed
blackfalcon opened this issue May 9, 2014 · 4 comments
Closed

"Include" extenal content #226

blackfalcon opened this issue May 9, 2014 · 4 comments

Comments

@blackfalcon
Copy link

It would be great if we could use a syntax like {{path/to/markdown.md}} to allow for reusable content, notes and code examples.

@AaronO
Copy link

AaronO commented May 9, 2014

@blackfalcon Yep, I saw that Rust by example (https://github.com/japaric/rust-by-example), has it's own preprocessor to do that.

I wonder if there are any plans in adding that to gfm, but it definitely makes sense when including larger pieces of code.

Also we need to decide how it should behave :
- A dump include of the contents
- Or including the contents of that file inside a code block

@show0k
Copy link

show0k commented Mar 24, 2016

This issue can be closed ; as far as I know it is already included in gitbook.

You can do

{% include "./test.md" %}
{% include "git+https://github.com/GitbookIO/documentation.git/README.md#0.0.1" %}

@AaronO
Copy link

AaronO commented Mar 24, 2016

It is indeed. This was added with gitbook 1.0.0 if I recall correctly :)

@AaronO AaronO closed this as completed Mar 24, 2016
@show0k
Copy link

show0k commented Mar 25, 2016

This a little off topic question, but why don't you let include files from HTTP requests with a syntax like
{% include "https://raw.githubusercontent.com/GitbookIO/documentation/master/README.md" %}
?
If the git repo is fat, it can be very slow to import the file. And by the way, if you find interesting to use a VCS, SVN allow to pull file by file, it is convenient to use it on GitHub repo for fetching a file.

Nyar233 pushed a commit to Nyar233/gitbook that referenced this issue May 12, 2024
* Log

* Try to fix

* Use automaticDeserialization

* Log errors

* Ignore AbortError
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

4 participants