|
| 1 | +# hugo server --minify --themesDir ... --baseURL=http://0.0.0.0:1313/theme/hugo-book/ |
| 2 | + |
| 3 | +baseURL:https://example.com/ |
| 4 | +title:Hugo Book |
| 5 | +theme:book |
| 6 | + |
| 7 | +# Book configuration |
| 8 | +disablePathToLower:true |
| 9 | +enableGitInfo:true |
| 10 | + |
| 11 | +# Needed for mermaid/katex shortcodes |
| 12 | +markup: |
| 13 | +goldmark: |
| 14 | +renderer: |
| 15 | +unsafe:true |
| 16 | +tableOfContents: |
| 17 | +startLevel:1 |
| 18 | + |
| 19 | +# Multi-lingual mode config |
| 20 | +# There are different options to translate files |
| 21 | +# See https://gohugo.io/content-management/multilingual/#translation-by-filename |
| 22 | +# And https://gohugo.io/content-management/multilingual/#translation-by-content-directory |
| 23 | +languages: |
| 24 | +zh: |
| 25 | +languageName:中文 |
| 26 | +contentDir:content/zh |
| 27 | +weight:1 |
| 28 | +en: |
| 29 | +languageName:English |
| 30 | +contentDir:content/en |
| 31 | +weight:2 |
| 32 | + |
| 33 | +menu: |
| 34 | +# before: [] |
| 35 | +after: |
| 36 | + -name:"Github" |
| 37 | +url:"https://github.com/alex-shpak/hugo-book" |
| 38 | +weight:10 |
| 39 | + -name:"Hugo Themes" |
| 40 | +url:"https://themes.gohugo.io/hugo-book/" |
| 41 | +weight:20 |
| 42 | + |
| 43 | +params: |
| 44 | +# (Optional, default light) Sets color theme: light, dark or auto. |
| 45 | +# Theme 'auto' switches between dark and light modes based on browser/os preferences |
| 46 | +BookTheme:"light" |
| 47 | + |
| 48 | +# (Optional, default true) Controls table of contents visibility on right side of pages. |
| 49 | +# Start and end levels can be controlled with markup.tableOfContents setting. |
| 50 | +# You can also specify this parameter per page in front matter. |
| 51 | +BookToC:true |
| 52 | + |
| 53 | +# (Optional, default none) Set the path to a logo for the book. If the logo is |
| 54 | +# /static/logo.png then the path would be logo.png |
| 55 | +# BookLogo: /logo.png |
| 56 | + |
| 57 | +# (Optional, default none) Set leaf bundle to render as side menu |
| 58 | +# When not specified file structure and weights will be used |
| 59 | +# BookMenuBundle: /menu |
| 60 | + |
| 61 | +# (Optional, default docs) Specify root page to render child pages as menu. |
| 62 | +# Page is resoled by .GetPage function: https://gohugo.io/functions/getpage/ |
| 63 | +# For backward compatibility you can set '*' to render all sections to menu. Acts same as '/' |
| 64 | +BookSection:docs |
| 65 | + |
| 66 | +# Set source repository location. |
| 67 | +# Used for 'Last Modified' and 'Edit this page' links. |
| 68 | +BookRepo:https://github.com/alex-shpak/hugo-book |
| 69 | + |
| 70 | +# (Optional, default 'commit') Specifies commit portion of the link to the page's last modified |
| 71 | +# commit hash for 'doc' page type. |
| 72 | +# Requires 'BookRepo' param. |
| 73 | +# Value used to construct a URL consisting of BookRepo/BookCommitPath/<commit-hash> |
| 74 | +# Github uses 'commit', Bitbucket uses 'commits' |
| 75 | +# BookCommitPath: commit |
| 76 | + |
| 77 | +# Enable "Edit this page" links for 'doc' page type. |
| 78 | +# Disabled by default. Uncomment to enable. Requires 'BookRepo' param. |
| 79 | +# Edit path must point to root directory of repo. |
| 80 | +BookEditPath:edit/main/exampleSite |
| 81 | + |
| 82 | +# Configure the date format used on the pages |
| 83 | +# - In git information |
| 84 | +# - In blog posts |
| 85 | +BookDateFormat:"January 2, 2006" |
| 86 | + |
| 87 | +# (Optional, default true) Enables search function with flexsearch, |
| 88 | +# Index is built on fly, therefore it might slowdown your website. |
| 89 | +# Configuration for indexing can be adjusted in i18n folder per language. |
| 90 | +BookSearch:true |
| 91 | + |
| 92 | +# (Optional, default true) Enables comments template on pages |
| 93 | +# By default partals/docs/comments.html includes Disqus template |
| 94 | +# See https://gohugo.io/content-management/comments/#configure-disqus |
| 95 | +# Can be overwritten by same param in page frontmatter |
| 96 | +BookComments:true |
| 97 | + |
| 98 | +# /!\ This is an experimental feature, might be removed or changed at any time |
| 99 | +# (Optional, experimental, default false) Enables portable links and link checks in markdown pages. |
| 100 | +# Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode |
| 101 | +# Theme will print warning if page referenced in markdown does not exists. |
| 102 | +BookPortableLinks:true |
| 103 | + |
| 104 | +# /!\ This is an experimental feature, might be removed or changed at any time |
| 105 | +# (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use. |
| 106 | +BookServiceWorker:true |
| 107 | + |
| 108 | +# /!\ This is an experimental feature, might be removed or changed at any time |
| 109 | +# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present. |
| 110 | +BookTranslatedOnly:false |