Import file does not work
The specified syntax is: {{./myfile.md}}
- It is ignored in the preview window.
- Running gitbook build command fails when it encounters the request to import the file. The error states that the dot used in the path specification is an unexpected token.
- Requesting a nonexistent file does NOT produce an error or generate any sort of message. A missing file is just ignored.
You are using the wrong syntax, Importing a file is done using:
{% include "./myfile.md" %}
Look at the documentation: https://ganiutomo.gitbooks.io/gitbook-documentation/content/book/variables.html
Import files In the same way, files can be imported:
This is a test:
{{ ./file.md }}
From: Samy Pessé [mailto:[email protected]] Sent: Wednesday, May 11, 2016 2:36 PM To: GitbookIO/gitbook [email protected] Cc: Torres, Abel [email protected]; Author [email protected] Subject: Re: [GitbookIO/gitbook] Import file does not work (#1296)
You are using the wrong syntax, Importing a file is done using:
{% include "./myfile.md" %}
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://github.com/GitbookIO/gitbook/issues/1296#issuecomment-218597525
Hi,
You are referring to a forked version of the documentation, which was done by somebody more than 1 year ago, so it's quite outdated.
The official documentation maintained by the GitBook guys can be found here: http://toolchain.gitbook.com
The part you are interested in: http://toolchain.gitbook.com/templating/conrefs.html
Cheers, Imre