gitbook icon indicating copy to clipboard operation
gitbook copied to clipboard

Import file does not work

Open Abel-Torres opened this issue 10 years ago • 3 comments

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.

Abel-Torres avatar May 11 '16 21:05 Abel-Torres

You are using the wrong syntax, Importing a file is done using:

{% include "./myfile.md" %}

SamyPesse avatar May 11 '16 21:05 SamyPesse

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

Abel-Torres avatar May 11 '16 21:05 Abel-Torres

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

nagim avatar May 12 '16 07:05 nagim