mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
@@ -1,20 +1,16 @@
|
||||
---
|
||||
title: Content Management
|
||||
linktitle: Content Management Overview
|
||||
linkTitle: Content Management Overview
|
||||
description: Hugo makes managing large static sites easy with support for archetypes, content types, menus, cross references, summaries, and more.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
lastmod: 2017-02-01
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 1
|
||||
parent: content-management
|
||||
weight: 10
|
||||
keywords: [source, organization]
|
||||
categories: [content management]
|
||||
weight: 01 #rem
|
||||
draft: false
|
||||
aliases: [/content/,/content/organization]
|
||||
toc: false
|
||||
weight: 10
|
||||
aliases: [/content/,/content/organization]
|
||||
---
|
||||
|
||||
A static site generator needs to extend beyond front matter and a couple of templates to be both scalable and *manageable*. Hugo was designed with not only developers in mind, but also content managers and authors.
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
---
|
||||
title: Archetypes
|
||||
linktitle: Archetypes
|
||||
linkTitle: Archetypes
|
||||
description: Archetypes are templates used when creating new content.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
keywords: [archetypes,generators,metadata,front matter]
|
||||
categories: ["content management"]
|
||||
categories: [content management]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 70
|
||||
parent: content-management
|
||||
weight: 140
|
||||
quicklinks:
|
||||
weight: 70 #rem
|
||||
aliases: [/content/archetypes/]
|
||||
toc: true
|
||||
weight: 140
|
||||
aliases: [/content/archetypes/]
|
||||
---
|
||||
|
||||
## What are Archetypes?
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
---
|
||||
title: Build Options
|
||||
linktitle: Build Options
|
||||
linkTitle: Build Options
|
||||
description: Build options help define how Hugo must treat a given page when building the site.
|
||||
date: 2020-03-02
|
||||
publishdate: 2020-03-02
|
||||
keywords: [build,content,front matter, page resources]
|
||||
categories: ["content management"]
|
||||
categories: [content management]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 31
|
||||
weight: 31 #rem
|
||||
draft: false
|
||||
aliases: [/content/build-options/]
|
||||
parent: content-management
|
||||
weight: 70
|
||||
toc: true
|
||||
weight: 70
|
||||
aliases: [/content/build-options/]
|
||||
---
|
||||
|
||||
They are stored in a reserved Front Matter object named `_build` with the following defaults:
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
---
|
||||
title: Comments
|
||||
linktitle: Comments
|
||||
linkTitle: Comments
|
||||
description: Hugo ships with an internal Disqus template, but this isn't the only commenting system that will work with your new Hugo website.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
keywords: [sections,content,organization]
|
||||
categories: [project organization, fundamentals]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 140
|
||||
weight: 140 #rem
|
||||
aliases: [/extras/comments/]
|
||||
parent: content-management
|
||||
weight: 220
|
||||
toc: true
|
||||
weight: 220
|
||||
aliases: [/extras/comments/]
|
||||
---
|
||||
|
||||
Hugo ships with support for [Disqus](https://disqus.com/), a third-party service that provides comment and community capabilities to websites via JavaScript.
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
---
|
||||
title: Links and Cross References
|
||||
linkTitle: Links and Cross References
|
||||
description: Shortcodes for creating links to documents.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
lastmod: 2017-03-31
|
||||
categories: [content management]
|
||||
keywords: ["cross references","references", "anchors", "urls"]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 100
|
||||
weight: 100 #rem
|
||||
aliases: [/extras/crossreferences/]
|
||||
parent: content-management
|
||||
weight: 170
|
||||
toc: true
|
||||
weight: 170
|
||||
aliases: [/extras/crossreferences/]
|
||||
---
|
||||
|
||||
The `ref` and `relref` shortcodes display the absolute and relative permalinks to a document, respectively.
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
---
|
||||
title: Diagrams
|
||||
LinkTitle: Diagrams
|
||||
description: Use fenced code blocks and markdown render hooks to display diagrams.
|
||||
categories: [content management]
|
||||
keywords: [diagrams,drawing]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 22
|
||||
weight: 22
|
||||
parent: content-management
|
||||
weight: 50
|
||||
toc: true
|
||||
weight: 50
|
||||
---
|
||||
{{< new-in "0.93.0" >}}
|
||||
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
---
|
||||
title: Content Formats
|
||||
linktitle: Content Formats
|
||||
linkTitle: Content Formats
|
||||
description: Both HTML and Markdown are supported content formats.
|
||||
date: 2017-01-10
|
||||
publishdate: 2017-01-10
|
||||
categories: [content management]
|
||||
keywords: [markdown,asciidoc,pandoc,content format]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 20
|
||||
weight: 20 #rem
|
||||
draft: false
|
||||
aliases: [/content/markdown-extras/,/content/supported-formats/,/doc/supported-formats/]
|
||||
parent: content-management
|
||||
weight: 40
|
||||
toc: true
|
||||
weight: 40
|
||||
aliases: [/content/markdown-extras/,/content/supported-formats/,/doc/supported-formats/]
|
||||
---
|
||||
|
||||
You can put any file type into your `/content` directories, but Hugo uses the `markup` front matter value if set or the file extension (see `Markup identifiers` in the table below) to determine if the markup needs to be processed, e.g.:
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
---
|
||||
title: Front Matter
|
||||
linktitle:
|
||||
linkTitle: Front Matter
|
||||
description: Hugo allows you to add front matter in yaml, toml, or json to your content files.
|
||||
date: 2017-01-09
|
||||
publishdate: 2017-01-09
|
||||
lastmod: 2017-02-24
|
||||
categories: [content management]
|
||||
keywords: ["front matter", "yaml", "toml", "json", "metadata", "archetypes"]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 30
|
||||
weight: 30 #rem
|
||||
draft: false
|
||||
aliases: [/content/front-matter/]
|
||||
parent: content-management
|
||||
weight: 60
|
||||
toc: true
|
||||
weight: 60
|
||||
aliases: [/content/front-matter/]
|
||||
---
|
||||
|
||||
**Front matter** allows you to keep metadata attached to an instance of a [content type][]---i.e., embedded inside a content file---and is one of the many features that gives Hugo its strength.
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
---
|
||||
title: "Image Processing"
|
||||
description: "Resize, crop, rotate, filter, and convert images."
|
||||
date: 2018-01-24T13:10:00-05:00
|
||||
categories: ["content management"]
|
||||
title: Image Processing
|
||||
linkTitle: Image Processing
|
||||
description: Resize, crop, rotate, filter, and convert images.
|
||||
categories: [content management]
|
||||
keywords: [resources, images]
|
||||
weight: 4004
|
||||
draft: false
|
||||
toc: true
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 32
|
||||
parent: content-management
|
||||
weight: 90
|
||||
toc: true
|
||||
weight: 90
|
||||
---
|
||||
## Image Resources
|
||||
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
---
|
||||
title: Menus
|
||||
linktitle: Menus
|
||||
linkTitle: Menus
|
||||
description: Hugo has a simple yet powerful menu system.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
lastmod: 2017-03-31
|
||||
categories: [content management]
|
||||
keywords: [menus]
|
||||
draft: false
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 120
|
||||
weight: 120
|
||||
aliases: [/extras/menus/]
|
||||
parent: content-management
|
||||
weight: 190
|
||||
toc: true
|
||||
weight: 190
|
||||
aliases: [/extras/menus/]
|
||||
---
|
||||
|
||||
{{% note "Lazy Blogger"%}}
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
---
|
||||
title: Multilingual Mode
|
||||
linktitle: Multilingual
|
||||
linkTitle: Multilingual
|
||||
description: Hugo supports the creation of websites with multiple languages side by side.
|
||||
date: 2017-01-10
|
||||
publishdate: 2017-01-10
|
||||
categories: [content management]
|
||||
keywords: [multilingual,i18n, internationalization]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 150
|
||||
weight: 150 #rem
|
||||
draft: false
|
||||
aliases: [/content/multilingual/,/tutorials/create-a-multilingual-site/]
|
||||
parent: content-management
|
||||
weight: 230
|
||||
toc: true
|
||||
weight: 230
|
||||
aliases: [/content/multilingual/,/tutorials/create-a-multilingual-site/]
|
||||
---
|
||||
|
||||
You should define the available languages in a `languages` section in your site configuration.
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
---
|
||||
title: Content Organization
|
||||
linktitle: Organization
|
||||
linkTitle: Organization
|
||||
description: Hugo assumes that the same structure that works to organize your source content is used to organize the rendered site.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
categories: [content management,fundamentals]
|
||||
keywords: [sections,content,organization,bundle,resources]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 10
|
||||
weight: 10 #rem
|
||||
aliases: [/content/sections/]
|
||||
parent: content-management
|
||||
weight: 20
|
||||
toc: true
|
||||
weight: 20
|
||||
aliases: [/content/sections/]
|
||||
---
|
||||
|
||||
## Page Bundles
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
---
|
||||
title : "Page Bundles"
|
||||
description : "Content organization using Page Bundles"
|
||||
date : 2018-01-24T13:09:00-05:00
|
||||
linktitle : "Page Bundles"
|
||||
keywords : ["page", "bundle", "leaf", "branch"]
|
||||
categories : ["content management"]
|
||||
toc : true
|
||||
title: Page Bundles
|
||||
linkTitle: Page Bundles
|
||||
description: Content organization using Page Bundles
|
||||
linkTitle: Page Bundles
|
||||
keywords: [page, bundle, leaf, branch]
|
||||
categories: [content management]
|
||||
menu :
|
||||
docs:
|
||||
identifier : "page-bundles"
|
||||
parent : "content-management"
|
||||
weight : 11
|
||||
identifier: "page-bundles"
|
||||
parent: "content-management"
|
||||
weight: 30
|
||||
toc: true
|
||||
weight: 30
|
||||
---
|
||||
|
||||
Page Bundles are a way to group [Page Resources](/content-management/page-resources/).
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
---
|
||||
title : "Page Resources"
|
||||
description : "Page resources -- images, other pages, documents, etc. -- have page-relative URLs and their own metadata."
|
||||
date: 2018-01-24
|
||||
categories: ["content management"]
|
||||
title: Page Resources
|
||||
linkTitle: Page Resources
|
||||
description: Page resources -- images, other pages, documents, etc. -- have page-relative URLs and their own metadata.
|
||||
categories: [content management]
|
||||
keywords: [bundle,content,resources]
|
||||
weight: 4003
|
||||
draft: false
|
||||
toc: true
|
||||
linktitle: "Page Resources"
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 31
|
||||
parent: content-management
|
||||
weight: 80
|
||||
toc: true
|
||||
weight: 80
|
||||
---
|
||||
Page resources are only accessible from [page bundles]({{< relref
|
||||
"/content-management/page-bundles" >}}), those directories with `index.md` or
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
---
|
||||
title: Related Content
|
||||
linkTitle: Related Content
|
||||
description: List related content in "See Also" sections.
|
||||
date: 2017-09-05
|
||||
categories: [content management]
|
||||
keywords: [content]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 40
|
||||
weight: 30
|
||||
draft: false
|
||||
aliases: [/content/related/,/related/]
|
||||
parent: content-management
|
||||
weight: 110
|
||||
toc: true
|
||||
weight: 110
|
||||
aliases: [/content/related/,/related/]
|
||||
---
|
||||
|
||||
Hugo uses a set of factors to identify a page's related content based on Front Matter parameters. This can be tuned to the desired set of indices and parameters or left to Hugo's default [Related Content configuration](#configure-related-content).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Content Sections
|
||||
linktitle: Sections
|
||||
description: "Hugo generates a **section tree** that matches your content."
|
||||
linkTitle: Sections
|
||||
description: Hugo generates a **section tree** that matches your content.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
lastmod: 2017-02-01
|
||||
@@ -9,12 +9,11 @@ categories: [content management]
|
||||
keywords: [lists,sections,content types,organization]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 50
|
||||
weight: 50 #rem
|
||||
draft: false
|
||||
aliases: [/content/sections/]
|
||||
parent: content-management
|
||||
weight: 120
|
||||
toc: true
|
||||
weight: 120
|
||||
aliases: [/content/sections/]
|
||||
---
|
||||
|
||||
A **Section** is a collection of pages that gets defined based on the
|
||||
|
||||
@@ -1,21 +1,17 @@
|
||||
---
|
||||
title: Shortcodes
|
||||
linktitle:
|
||||
linkTitle: Shortcodes
|
||||
description: Shortcodes are simple snippets inside your content files calling built-in or custom templates.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
lastmod: 2019-11-07
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 35
|
||||
weight: 35 #rem
|
||||
categories: [content management]
|
||||
keywords: [markdown,content,shortcodes]
|
||||
draft: false
|
||||
menu:
|
||||
docs:
|
||||
parent: content-management
|
||||
weight: 100
|
||||
toc: true
|
||||
weight: 100
|
||||
aliases: [/extras/shortcodes/]
|
||||
testparam: "Hugo Rocks!"
|
||||
toc: true
|
||||
---
|
||||
|
||||
## What a Shortcode is
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
---
|
||||
title: Static Files
|
||||
description: "Files that get served **statically** (as-is, no modification) on the site root."
|
||||
date: 2017-11-18
|
||||
linkTitle: Static Files
|
||||
description: Files that get served **statically** (as-is, no modification) on the site root.
|
||||
categories: [content management]
|
||||
keywords: [source, directories]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 130
|
||||
weight: 130 #rem
|
||||
aliases: [/static-files]
|
||||
parent: content-management
|
||||
weight: 200
|
||||
toc: true
|
||||
weight: 200
|
||||
aliases: [/static-files]
|
||||
---
|
||||
|
||||
By default, the `static/` directory in the site project is used for
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
---
|
||||
title: Content Summaries
|
||||
linktitle: Summaries
|
||||
linkTitle: Summaries
|
||||
description: Hugo generates summaries of your content.
|
||||
date: 2017-01-10
|
||||
publishdate: 2017-01-10
|
||||
lastmod: 2017-01-10
|
||||
categories: [content management]
|
||||
keywords: [summaries,abstracts,read more]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 90
|
||||
weight: 90 #rem
|
||||
draft: false
|
||||
aliases: [/content/summaries/,/content-management/content-summaries/]
|
||||
parent: content-management
|
||||
weight: 160
|
||||
toc: true
|
||||
weight: 160
|
||||
aliases: [/content/summaries/,/content-management/content-summaries/]
|
||||
---
|
||||
|
||||
With the use of the `.Summary` [page variable][pagevariables], Hugo generates summaries of content to use as a short version in summary views.
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
---
|
||||
title: Syntax Highlighting
|
||||
linkTitle: Syntax Highlighting
|
||||
description: Hugo comes with really fast syntax highlighting from Chroma.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
keywords: [highlighting,chroma,code blocks,syntax]
|
||||
categories: [content management]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 300
|
||||
weight: 20
|
||||
sections_weight: 20
|
||||
draft: false
|
||||
aliases: [/extras/highlighting/,/extras/highlight/,/tools/syntax-highlighting/]
|
||||
parent: content-management
|
||||
weight: 240
|
||||
toc: true
|
||||
weight: 240
|
||||
aliases: [/extras/highlighting/,/extras/highlight/,/tools/syntax-highlighting/]
|
||||
---
|
||||
|
||||
Hugo uses [Chroma](https://github.com/alecthomas/chroma) as its code highlighter; it is built in Go and is really, really fast.
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
---
|
||||
title: Taxonomies
|
||||
linktitle:
|
||||
linkTitle: Taxonomies
|
||||
description: Hugo includes support for user-defined taxonomies.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
keywords: [taxonomies,metadata,front matter,terms]
|
||||
categories: [content management]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 80
|
||||
weight: 80 #rem
|
||||
draft: false
|
||||
aliases: [/taxonomies/overview/,/taxonomies/usage/,/indexes/overview/,/doc/indexes/,/extras/indexes]
|
||||
parent: content-management
|
||||
weight: 150
|
||||
toc: true
|
||||
weight: 150
|
||||
aliases: [/taxonomies/overview/,/taxonomies/usage/,/indexes/overview/,/doc/indexes/,/extras/indexes]
|
||||
---
|
||||
|
||||
## What is a Taxonomy?
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
---
|
||||
title: Table of Contents
|
||||
linktitle:
|
||||
linkTitle: Table of Contents
|
||||
description: Hugo can automatically parse Markdown content and create a Table of Contents you can use in your templates.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
lastmod: 2017-02-01
|
||||
categories: [content management]
|
||||
keywords: [table of contents, toc]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 130
|
||||
weight: 130 #rem
|
||||
draft: false
|
||||
aliases: [/extras/toc/]
|
||||
parent: content-management
|
||||
weight: 210
|
||||
toc: true
|
||||
weight: 210
|
||||
aliases: [/extras/toc/]
|
||||
---
|
||||
|
||||
{{% note "TOC Heading Levels are Fixed" %}}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
---
|
||||
title: Content Types
|
||||
linkTitle: Content Types
|
||||
description: Hugo is built around content organized in sections.
|
||||
date: 2017-02-01
|
||||
categories: [content management]
|
||||
keywords: [lists, sections, content types, types, organization]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 60
|
||||
weight: 60 #rem
|
||||
draft: false
|
||||
aliases: [/content/types]
|
||||
parent: content-management
|
||||
weight: 130
|
||||
toc: true
|
||||
weight: 130
|
||||
aliases: [/content/types]
|
||||
---
|
||||
|
||||
A **content type** is a way to organize your content. Hugo resolves the content type from either the `type` in front matter or, if not set, the first directory in the file path. E.g. `content/blog/my-first-event.md` will be of type `blog` if no `type` is set.
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
---
|
||||
title: URL Management
|
||||
linktitle: URL Management
|
||||
linkTitle: URL Management
|
||||
description: Hugo supports permalinks, aliases, link canonicalization, and multiple options for handling relative vs absolute URLs.
|
||||
date: 2017-02-01
|
||||
publishdate: 2017-02-01
|
||||
keywords: [aliases,redirects,permalinks,urls]
|
||||
categories: [content management]
|
||||
keywords: [aliases,redirects,permalinks,urls]
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
weight: 110
|
||||
weight: 110 #rem
|
||||
aliases: [/extras/permalinks/,/extras/aliases/,/extras/urls/,/doc/redirects/,/doc/alias/,/doc/aliases/]
|
||||
parent: content-management
|
||||
weight: 180
|
||||
toc: true
|
||||
weight: 180
|
||||
aliases: [/extras/permalinks/,/extras/aliases/,/extras/urls/,/doc/redirects/,/doc/alias/,/doc/aliases/]
|
||||
---
|
||||
|
||||
## Permalinks
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
---
|
||||
title: 内容管理
|
||||
linktitle: 内容管理概览
|
||||
linkTitle: 内容管理概览
|
||||
description: Hugo 可以管理大型的静态网站,支持骨架、内容类型、菜单、引用、概要等等。
|
||||
date: 2018-04-23
|
||||
publishdate: 2018-04-23
|
||||
lastmod: 2018-04-23
|
||||
menu:
|
||||
docs:
|
||||
parent: "content-management"
|
||||
parent: content-management
|
||||
weight: 1
|
||||
keywords: [source, organization]
|
||||
categories: [content management]
|
||||
weight: 01 #rem
|
||||
draft: false
|
||||
aliases: [/content/,/content/organization]
|
||||
toc: false
|
||||
isCJKLanguage: true
|
||||
|
||||
Reference in New Issue
Block a user