https://github.com/gitbookio/theme-faq
Theme for publishing a FAQ or Knowledge base
https://github.com/gitbookio/theme-faq
Last synced: 11 months ago
JSON representation
Theme for publishing a FAQ or Knowledge base
- Host: GitHub
- URL: https://github.com/gitbookio/theme-faq
- Owner: GitbookIO
- Created: 2016-04-13T09:43:03.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-10-04T15:19:21.000Z (over 7 years ago)
- Last Synced: 2025-01-08T10:14:23.502Z (about 1 year ago)
- Language: HTML
- Size: 33.2 KB
- Stars: 38
- Watchers: 9
- Forks: 25
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitBook FAQ Theme
Theme for using GitBook to publish an FAQ or Knowledge Base. This theme works perfectly with search plugins (as the [default one](https://github.com/GitbookIO/plugin-search) or [algolia](https://github.com/GitbookIO/plugin-algolia)).
## Usage
This theme requires GitBook version 3 or later.
Add the theme to your book's configuration (`book.json`):
```js
{
"plugins": [
"theme-faq",
"-fontsettings",
"-sharing"
]
}
```
**NOTE** `theme-faq` is not compatible with plugins that modify the toolbar (since there is no toolbar). Embedded search will not work as a result. This includes the default plugins `fontsettings` and `sharing` that need to be disabled explicitly (add a minus flag "-" before each plugin parameter).
### Add relations between articles
Suggestions for other articles can be shown at the bottom of an article.
Relationships are specified in the YAML frontmatter of a page:
```md
---
related:
- some/other/page.md
- another_related_article.md
---
Content of my article!
```
### Add logo to header
Extend the theme by creating a file `_layouts/website/page.html` in your book with:
```html
{% extends template.self %}
{% block faq_header_brand %}
{% endblock %}
```
### Add navigation links to the header
Extend the theme by creating a file `_layouts/website/page.html` in your book with:
```html
{% extends template.self %}
{% block faq_menu %}
{% endblock %}
```
### Add a short description on the home page
The content of your `README` is used as a short description for the home page of your FAQ.
If you wish use a specific file for this description instead of your project's README, you can configure your `book.json` to do so:
```json
{
"structure": {
"readme": "home-page-description.md"
}
}
```