abeggchr / gitbook-plugin-onlineresources

GitBook plugin to append a resources markdown, shown fully on the website and as a link in ebooks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gitbook-plugin-onlineresources

GitBook plugin to append a resources markdown, shown fully on the website and as a link in ebooks

Display a link to your GitHub repo in your gitbook.

Usage

  1. Write an article (i.e. called article.md) and list it in the SUMMARY.md
  2. Write a resources file for the article
  3. Save the resources file with the following name: {original}.resources.md (i.e. article.resources.md)
  4. Include the resources file in the article using {% include "./article.resources.md" %}
  5. Put this in your book.json:
{
    "plugins": [ "onlineresources@git+https://github.com/abeggchr/gitbook-plugin-onlineresources" ],
    "pluginsConfig": {
        "onlineresources": {
            "url": "https://pages.github.com/your/repo",
            "text": {
                "left": "Online Resources: ",
                "right": "",
                "above": "",
                "below": ""
            },
            "qrCodeOptions": {
                // see: https://www.npmjs.com/package/qrcode#qr-code-options
                "margin": 0,
            }
        }
    }
}

Result

When generating a website, the resources file is included. When generating an eBook, a link to the resources file is shown as QR code.

EBook: EBook

Web: Web

About

GitBook plugin to append a resources markdown, shown fully on the website and as a link in ebooks.


Languages

Language:JavaScript 100.0%