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.
- Write an article (i.e. called
article.md
) and list it in the SUMMARY.md - Write a resources file for the article
- Save the resources file with the following name:
{original}.resources.md
(i.e.article.resources.md
) - Include the resources file in the article using
{% include "./article.resources.md" %}
- 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,
}
}
}
}
When generating a website, the resources file is included. When generating an eBook, a link to the resources file is shown as QR code.