Basic
Hugo supports hugo.toml、hugo.yaml、hugo.json format and follow the order, supporting split configuration file by envirament, root configuration key, and language.
Note
See Hugo Documentation for more details.
Hugo Narrow uses split configuration with YAML.
- hugo.yaml
- languages.yaml
- menus.yaml
- params.yaml
The site configuration is not much different from that of a regular Hugo site; the special part is:
permalinks.projectssets the permalinks for projects.outputFormats.WebAppManifestautomatically generates theWebAppManifestconfiguration for the theme.highlight.lineNumbersInTableneeds to be set tofalse.highlight.stylesetting does not take effect. To change the Hugo Narrow codeblock style, you need to modify the CSS files.- The minimum required version of Hugo is 0.146.
baseURL: https://hugo-narrow.vercel.app/
languageCode: en-US
defaultContentLanguage: en
defaultContentLanguageInSubdir: false
title: Hugo Narrow
theme: "hugo-narrow"
hasCJKLanguage: true
enableEmoji: true
permalinks:
posts: /posts/:slug/
projects: /projects/:slug/
pages: /:slug/
pagination:
pagerSize: 6
path: "page"
taxonomies:
category: categories
tag: tags
markup:
tableOfContents:
startLevel: 2
endLevel: 4
ordered: false
goldmark:
renderer:
unsafe: true
extensions:
extras:
delete:
enable: true
insert:
enable: true
mark:
enable: true
subscript:
enable: false
superscript:
enable: false
strikethrough: false
highlight:
codeFences: true
guessSyntax: false
lineNos: false
lineNumbersInTable: false # Set to false
noClasses: false
style: github # No need to change
tabWidth: 2
outputs:
home: ["HTML", "RSS", "JSON", "WebAppManifest"]
# Custom output
outputFormats:
WebAppManifest:
mediaType: "application/manifest+json"
baseName: "site"
isPlainText: true
module:
hugoVersion:
extended: true
min: 0.146.0