Skip to content

Commit

Permalink
docs: Add Hugo Modules docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jul 25, 2019
1 parent 869b87e commit 3fdb45b
Show file tree
Hide file tree
Showing 12 changed files with 314 additions and 529 deletions.
299 changes: 0 additions & 299 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,302 +111,3 @@ resampleFilter = "CatmullRom"
quality = 75

anchor = "smart"


## As of v0.20, all content files include a default "categories" value that's the same as the section. This was a cheap future-proofing method and should/could be changed accordingly.
[taxonomies]
category = "categories"

# High level items

[[menu.docs]]
name = "About Hugo"
weight = 1
identifier = "about"
url = "/about/"

[[menu.docs]]
name = "Getting Started"
weight = 5
identifier = "getting-started"
url = "/getting-started/"


[[menu.docs]]
name = "Themes"
weight = 15
identifier = "themes"
post = "break"
url = "/themes/"

# Core Menus

[[menu.docs]]
name = "Content Management"
weight = 20
identifier = "content-management"
post = "expanded"
url = "/content-management/"

[[menu.docs]]
name = "Templates"
weight = 25
identifier = "templates"

url = "/templates/"

[[menu.docs]]
name = "Functions"
weight = 30
identifier = "functions"
url = "/functions/"

[[menu.docs]]
name = "Variables"
weight = 35
identifier = "variables"
url = "/variables/"
[[menu.docs]]
name = "Hugo Pipes"
weight = 36
identifier = "pipes"
url = "/hugo-pipes/"
[[menu.docs]]
name = "CLI"
weight = 40
post = "break"
identifier = "commands"
url = "/commands/"



# LOW LEVEL ITEMS


[[menu.docs]]
name = "Troubleshooting"
weight = 60
identifier = "troubleshooting"
url = "/troubleshooting/"

[[menu.docs]]
name = "Tools"
weight = 70
identifier = "tools"
url = "/tools/"

[[menu.docs]]
name = "Hosting & Deployment"
weight = 80
identifier = "hosting-and-deployment"
url = "/hosting-and-deployment/"

[[menu.docs]]
name = "Contribute"
weight = 100
post = "break"
identifier = "contribute"
url = "/contribute/"

#[[menu.docs]]
# name = "Tags"
# weight = 120
# identifier = "tags"
# url = "/tags/"


# [[menu.docs]]
# name = "Categories"
# weight = 140
# identifier = "categories"
# url = "/categories/"

######## QUICKLINKS

[[menu.quicklinks]]
name = "Fundamentals"
weight = 1
identifier = "fundamentals"
url = "/tags/fundamentals/"




######## GLOBAL ITEMS TO BE SHARED WITH THE HUGO SITES

[[menu.global]]
name = "News"
weight = 1
identifier = "news"
url = "/news/"

[[menu.global]]
name = "Docs"
weight = 5
identifier = "docs"
url = "/documentation/"

[[menu.global]]
name = "Themes"
weight = 10
identifier = "themes"
url = "https://themes.gohugo.io/"

[[menu.global]]
name = "Showcase"
weight = 20
identifier = "showcase"
url = "/showcase/"

# Anything with a weight > 100 gets an external icon
[[menu.global]]
name = "Community"
weight = 150
icon = true
identifier = "community"
post = "external"
url = "https://discourse.gohugo.io/"


[[menu.global]]
name = "GitHub"
weight = 200
identifier = "github"
post = "external"
url = "https://github.com/gohugoio/hugo"

### LANGUAGES ###

[languages]
[languages.en]
contentDir = "content/en"
languageName = "English"
weight = 1
[languages.zh]
contentDir = "content/zh"
languageName = "中文"
weight = 2


### LANGUAGE-SPECIFIC MENUS ###

# Chinese menus

[[languages.zh.menu.docs]]
name = "关于 Hugo"
weight = 1
identifier = "about"
url = "/zh/about/"

[[languages.zh.menu.docs]]
name = "入门"
weight = 5
identifier = "getting-started"
url = "/zh/getting-started/"

[[languages.zh.menu.docs]]
name = "主题"
weight = 15
identifier = "themes"
post = "break"
url = "/zh/themes/"

# Core languages.zh.menus

[[languages.zh.menu.docs]]
name = "内容管理"
weight = 20
identifier = "content-management"
post = "expanded"
url = "/zh/content-management/"

[[languages.zh.menu.docs]]
name = "模板"
weight = 25
identifier = "templates"
url = "/zh/templates/"

[[languages.zh.menu.docs]]
name = "函数"
weight = 30
identifier = "functions"
url = "/zh/functions/"

[[languages.zh.menu.docs]]
name = "变量"
weight = 35
identifier = "variables"
url = "/zh/variables/"

[[languages.zh.menu.docs]]
name = "CLI"
weight = 40
post = "break"
identifier = "commands"
url = "/commands/"

# LOW LEVEL ITEMS
[[languages.zh.menu.docs]]
name = "故障排除"
weight = 60
identifier = "troubleshooting"
url = "/zh/troubleshooting/"

[[languages.zh.menu.docs]]
name = "工具"
weight = 70
identifier = "tools"
url = "/zh/tools/"

[[languages.zh.menu.docs]]
name = "托管与部署"
weight = 80
identifier = "hosting-and-deployment"
url = "/zh/hosting-and-deployment/"

[[languages.zh.menu.docs]]
name = "贡献"
weight = 100
post = "break"
identifier = "contribute"
url = "/zh/contribute/"

[[languages.zh.menu.global]]
name = "新闻"
weight = 1
identifier = "news"
url = "/zh/news/"

[[languages.zh.menu.global]]
name = "文档"
weight = 5
identifier = "docs"
url = "/zh/documentation/"

[[languages.zh.menu.global]]
name = "主题"
weight = 10
identifier = "themes"
url = "https://themes.gohugo.io/"

[[languages.zh.menu.global]]
name = "作品展示"
weight = 20
identifier = "showcase"
url = "/zh/showcase/"

# Anything with a weight > 100 gets an external icon
[[languages.zh.menu.global]]
name = "社区"
weight = 150
icon = true
identifier = "community"
post = "external"
url = "https://discourse.gohugo.io/"

[[languages.zh.menu.global]]
name = "GitHub"
weight = 200
identifier = "github"
post = "external"
url = "https://github.com/gohugoio/hugo"
6 changes: 3 additions & 3 deletions config/_default/menus/menus.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
url = "/getting-started/"

[[docs]]
name = "Themes"
name = "Hugo Modules"
weight = 15
identifier = "themes"
identifier = "modules"
post = "break"
url = "/themes/"
url = "/hugo-modules/"

# Core Menus

Expand Down
19 changes: 12 additions & 7 deletions content/en/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ hugo --config a.toml,b.toml,c.toml
Multiple site config files can be specified as a comma-separated string to the `--config` switch.
{{% /note %}}

TODO: distinct config.toml and others (the root object files)
{{< todo >}}TODO: distinct config.toml and others (the root object files){{< /todo >}}

## Configuration Directory

Expand Down Expand Up @@ -76,10 +76,10 @@ value in parentheses. Users may choose to override those values in their site
config file(s).

archetypeDir ("archetypes")
: The directory where Hugo finds archetype files (content templates).
: The directory where Hugo finds archetype files (content templates). {{% module-mounts-note %}}

assetDir ("assets")
: The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/).
: The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/). {{% module-mounts-note %}}

baseURL
: Hostname (and path) to the root, e.g. http://bep.is/
Expand All @@ -103,10 +103,10 @@ canonifyURLs (false)
: Enable to turn relative URLs into absolute.

contentDir ("content")
: The directory from where Hugo reads content files.
: The directory from where Hugo reads content files. {{% module-mounts-note %}}

dataDir ("data")
: The directory from where Hugo reads data files.
: The directory from where Hugo reads data files. {{% module-mounts-note %}}

defaultContentLanguage ("en")
: Content without language indicator will default to this language.
Expand Down Expand Up @@ -190,6 +190,9 @@ menu
metaDataFormat ("toml")
: Front matter meta-data format. Valid values: `"toml"`, `"yaml"`, or `"json"`.

module
: Module config see [Module Config](/hugo-modules/configuration/).

newContentEditor ("")
: The editor to use when creating new content.

Expand Down Expand Up @@ -245,7 +248,7 @@ sitemap
: Default [sitemap configuration](/templates/sitemap-template/#configure-sitemap-xml).

staticDir ("static")
: A directory or a list of directories from where Hugo reads [static files][static-files].
: A directory or a list of directories from where Hugo reads [static files][static-files]. {{% module-mounts-note %}}

summaryLength (70)
: The length of text in words to show in a [`.Summary`](/content-management/summaries/#hugo-defined-automatic-summary-splitting).
Expand Down Expand Up @@ -470,9 +473,11 @@ maxAge = -1
[caches.assets]
dir = ":resourceDir/_gen"
maxAge = -1
[caches.modules]
dir = ":cacheDir/modules"
maxAge = -1
```


You can override any of these cache setting in your own `config.toml`.

### The keywords explained
Expand Down
Loading

0 comments on commit 3fdb45b

Please sign in to comment.