https://github.com/nakov/gitbook-plugin-headers-and-footers
Gitbook Plugin for Inserting Headers and Footers
https://github.com/nakov/gitbook-plugin-headers-and-footers
Last synced: 9 days ago
JSON representation
Gitbook Plugin for Inserting Headers and Footers
- Host: GitHub
- URL: https://github.com/nakov/gitbook-plugin-headers-and-footers
- Owner: nakov
- Created: 2021-12-14T14:46:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-14T15:01:11.000Z (over 4 years ago)
- Last Synced: 2025-02-26T18:53:18.330Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitBook Plugin to Add Headers and Footers
This plugin allows adding **headers** and **footers** in the book (statically, during the book build process):
- **Navigation header** (above the search box on the left)
- **Navigation footer** (replaces the last navigation link "Published with GitBook")
- **Page header** (at the top of the page section)
- **Page footer** (at the bottom of the page section)
The plugin is designed for `gitbook cli` toolchain.
## Warning
TODO: This plugin is **unfinished**! It inserts the header and footer HTML correctly, but the Gitbook runtume JS scripts give console errors. I should investigate how to fix these issues.
TODO: check this plugin: https://www.npmjs.com/package/gitbook-plugin-lotadata-header
## Installation
TODO: upload the plugin to https://npmjs.com.
```
npm install gitbook-plugin-headers-and-footers
```
## Usage
Specify the HTML templates for the headers and footers in the `book.json` config:
```
{
"plugins": [
"headers-and-footers"
],
"pluginsConfig": {
"layout": {
"navHeaderFileName" : "./assets/nav-header.html",
"navFooterFileName" : "./assets/nav-footer.html",
"pageHeaderFileName" : "./assets/page-header.html",
"pageFooterFileName" : "./assets/page-footer.html"
}
}
}
```
## Screenshots
TODO