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