diff --git a/README.md b/README.md index 4feedb3..d670ade 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![License](https://img.shields.io/:license-mit-blue.svg?style=flat-square)](https://badges.mit-license.org) ![visitors](https://visitor-badge.glitch.me/badge?page_id=anvithks.hugo-embed-pdf-shortcode) # hugo-embed-pdf-shortcode + --- # Table of Contents @@ -14,17 +15,40 @@ --- -## Introduction +## Introduction [\[Back to Top\]](#table-of-contents) This is a [Hugo Shortcode](https://gohugo.io/extras/shortcodes/) developed for use in [Hugo](https://gohugo.io/) based websites. This shortcode allows you to embed a PDF file in a page on your Hugo website. It is developed using the [PDF.js](https://mozilla.github.io/pdf.js/) library by Mozilla. ![hugo-embed-pdf-shortcode cover](hugo-embed-pdf-cover.png) -## Setup +## Setup [\[Back to Top\]](#table-of-contents) -**Note:** This shortcode is for use in Hugo based websites. It will not work anywhere else. +**Note:** This shortcode is for use in Hugo based websites. It will not work anywhere else. + +Hugo embed-pdf can be installed in two ways. + +### Method 1 - Install as a Git submodule + +1. Add this shortcode as a Git submodule + +```shell +git submodule add https://github.com/anvithks/hugo-embed-pdf-shortcode.git themes/hugo-embed-pdf-shortcode +``` + +2. Edit `config.toml` as follows + +``` +theme = ["hugo-embed-pdf-shortcode", "YourCurrentTheme"] +enableInlineShortcodes = true +``` + +**To learn more about "Theme components", see [the Hugo documentation](https://gohugo.io/hugo-modules/theme-components/)** + +