diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -12,12 +12,14 @@ * Designed to not interfere with other layouts * Zero initial configuration + ## Requirements * Hugo 0.43 or higher * Hugo extended version, read more [here](https://gohugo.io/news/0.43-relnotes/) + ## Installation -Navigate to your hugo website root and run: +Navigate to your hugo project root and run: ``` git submodule add https://github.com/alex-shpak/hugo-book themes/book ``` @@ -27,11 +29,24 @@ Then run hugo (or set `theme: book` in configuration file) hugo server --theme book ``` +### Creating site from scratch +Below is example how to create new site from scratch +```sh +hugo new site mydocs; cd mydocs +git init +git submodule add https://github.com/alex-shpak/hugo-book themes/book +cp -R themes/book/exampleSite/content . +``` +```sh +hugo server --theme book +``` + ## Menu ### File tree menu (default) By default theme will render pages from `content/docs` section as menu in a tree structure. You can set `title` and `weight` in front matter of pages to adjust order and titles in menu. + ### Leaf bundle menu You can also use leaf bundle and content of it's `index.md` as menu. @@ -65,9 +80,11 @@ And Enable it by settings `BookMenuBundle: /docs/menu` in Site configuration - [Example config file](https://github.com/alex-shpak/hugo-book/blob/master/exampleSite/config.yml) - [Leaf bundles](https://gohugo.io/content-management/page-bundles/) + ## Blog Simple blog supported for section `posts` + ## Configuration ### Site Configuration There are few configuration options you can add to your `config.yml|json|toml` file @@ -116,6 +133,7 @@ params: BookEditPath: edit/master/exampleSite/content ``` + ### Page Configuration You can specify additional params per page in front matter ```yaml @@ -134,6 +152,7 @@ bookShowToC: false --- ``` + ### Partials There are few empty partials you can override in `layouts/partials/` @@ -154,5 +173,6 @@ Primary goals are: Feel free to open issue if you missing some configuration or customization option. + ## License [MIT](LICENSE) |