GemBook allows adding data in yaml format (called FrontMatter) at the beginning of the Markdown file,
to set how documents appear in the sidebar and navigation bar. For example:
---
title: Sidebar title
sidebarIgnore: true
isNav: true
navTitle: Navigation bar title
navOrder: 2
redirect: ./new.md
---
# Markdown titleWARNING
Modifying redirect in development mode requires restarting the service to take effect.
The homepage also supports hero and features, for example:
---
hero:
title: GemBook
desc: Create your document website easily and quickly
actions:
- text: Getting Started
link: ./guide/README.md
features:
- title: Out of the box
icon: π
desc: Just run the command line to pack all front-end resources, so that all attention can be paid to document writing
- title: Performance
icon: /logo.png
desc: No redundant dependencies, the entire application will run smoothly with streamlined code
- title: Expandable
icon: π©βπ¨
desc: Can insert custom elements into existing websites; using custom elements can also customize display documents very conveniently
---
## Getting Started
<gbp-include src="./snippets/start.md"></gbp-include>
## Feedback
Please visit [GitHub](https://github.com/mantou132/gem)
The settings for Markdown also apply to folders, just add config.yml in the folder, for example:
title: ζε
Two special options are supported:
reverse: Reverse sort, which is useful when blogging
groups: Place multiple files within a group in the sidebar without modifying the directory structure
export interface FrontMatter {
title?: string;
isNav?: boolean;
navTitle?: string;
navOrder?: number;
sidebarIgnore?: boolean;
redirect?: string;
/** below only dir */
reverse?: boolean;
groups?: { title: string; members: string[] }[];
/** below only homepage */
hero?: Hero;
features?: Feature[];
}
export interface Hero {
title?: string;
desc?: string;
actions?: { text: string; link: string }[];
}
export interface Feature {
icon?: string;
title: string;
desc: string;
}