gitbook-cli icon indicating copy to clipboard operation
gitbook-cli copied to clipboard

PDF Generation Fails When Using API Template

Open nfantis opened this issue 7 years ago • 4 comments

We generate a PDF of our documentation using gitbook-cli. When trying to generate the PDF, if we have a page using the API template the generation fails:

gitbook pdf --config book.json ./ ./test.pdf
info: 7 plugins are installed
info: 6 explicitly listed
info: loading plugin "highlight"... OK
info: loading plugin "search"... OK
info: loading plugin "lunr"... OK
info: loading plugin "sharing"... OK
info: loading plugin "fontsettings"... OK
info: loading plugin "theme-default"... OK
info: found 21 pages
info: found 3 asset files
error: error while generating page "api/spc-service-api.md":

Template render error: (/home/ubuntu/git/data-team/api/spc-service-api.md) [Line 3, Column 2]
  unknown block tag: api
gitbook --version
CLI version: 2.3.2
GitBook version: 3.2.3

Anyone aware of any workarounds or an ETA on a fix?

nfantis avatar Jun 20 '18 16:06 nfantis

Are there backticks inside the api block by any chance?

I ran into a similar problem:

Template render error: 
  unknown block tag: endhint

hint is provided by a plugin and it works in a lot of places in my book, except for one. It didn't have any problem with backticks inside the block so far, but if I remove them for the one that raises the error everything compiles fine - really strange.

Simran-B avatar Jun 27 '18 01:06 Simran-B

I'm still running into this problem, and there are no backticks inside the hint block:

{% hint style="info" %}
New as of ME 1.13. Room Resources to allow you to use Lecture Capture
{% endhint %}

mattsimpson avatar Sep 18 '19 15:09 mattsimpson

@mattsimpson Does this work?

{% hint "info" %}
New as of ME 1.13. Room Resources to allow you to use Lecture Capture
{% endhint %}

Simran-B avatar Oct 07 '19 09:10 Simran-B

I'm still running into this problem, and there are no backticks inside the hint block:

{% hint style="info" %}
New as of ME 1.13. Room Resources to allow you to use Lecture Capture
{% endhint %}

I have the same problem. Found a solution?

Lexus123 avatar Apr 06 '22 21:04 Lexus123