pdf-multi-link

README

This is a quick and dirty fork from : show0k/gitbook-plugin-download-pdf-link

Gitbook plugin download-pdf-link

npm npm

GitBook Plugin to add a link on every page to download PDF.

To use this plugin, you have to modify your book.json configuration file.

{
  "plugins": ["pdf-multi-link"],
  "pluginsConfig": {
    "download-pdf-link": {
      "base": "https://www.gitbook.com/book/poppy-project/poppy-docs/",
      "label"
      }: {
          "en": "Download PDF",
          "fr": "Télécharger le PDF"
      }
    }
  }
}

but if you need to serve different pdf :

{
  "plugins": ["pdf-multi-link"],
  "pluginsConfig": {
    "download-pdf-link": {
      "base": { 
        "en":"https://www.gitbook.com/book/poppy-project/poppy-docs/en.pdf",
        "fr":"https://www.gitbook.com/book/poppy-project/poppy-docs/fr.pdf",
      },
      "label"
      }: {
          "en": "Download PDF",
          "fr": "Télécharger le PDF"
      }
    }
  }
}

you can remove the final '/' with "link": true If you are trying it on your desktop, run gitbook install to download and install the plugin, and gitboook serve . to run the rendering.

To see this plugin in action, you can see this example.


This plugin comes from the original plugin gitbook-plugin-downloadpdf which was broken for multilingual books.

Configuration

Setting Description Type Allowed values
base
required
Base for the PDF button redirection String | Object
-
label Label for the PDF button String | Object
default = Download PDF
-

Plugin

Add a download link for PDF on every page which works with multilingual GitBooks

https://github.com/armandfardeau/gitbook-plugin-download-pdf-link


Latest: 2.1.0

1.0.0, 2.1.0,

Requirements

GitBook
2.1.0 >2.5.0

Maintainers

Open on NPM