summaryrefslogtreecommitdiffstats
path: root/docs/content
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content')
-rw-r--r--docs/content/en/functions/images/index.md2
-rw-r--r--docs/content/en/functions/param.md59
-rw-r--r--docs/content/en/getting-started/configuration-markup.md3
-rw-r--r--docs/content/en/getting-started/configuration.md8
-rw-r--r--docs/content/en/getting-started/usage.md2
-rw-r--r--docs/content/en/hugo-modules/use-modules.md30
-rwxr-xr-xdocs/content/en/hugo-pipes/introduction.md12
-rwxr-xr-xdocs/content/en/hugo-pipes/scss-sass.md3
-rw-r--r--docs/content/en/templates/single-page-templates.md29
-rw-r--r--docs/content/en/tools/frontends.md1
-rw-r--r--docs/content/zh/_index.md49
-rw-r--r--docs/content/zh/about/_index.md20
-rw-r--r--docs/content/zh/content-management/_index.md20
-rw-r--r--docs/content/zh/documentation.md21
-rw-r--r--docs/content/zh/news/_index.md4
-rw-r--r--docs/content/zh/templates/_index.md19
-rw-r--r--docs/content/zh/templates/base.md131
-rw-r--r--docs/content/zh/tools/_index.md25
-rw-r--r--docs/content/zh/tools/search.md31
19 files changed, 105 insertions, 364 deletions
diff --git a/docs/content/en/functions/images/index.md b/docs/content/en/functions/images/index.md
index 0cf45b6ee..e7fc50f7e 100644
--- a/docs/content/en/functions/images/index.md
+++ b/docs/content/en/functions/images/index.md
@@ -60,7 +60,7 @@ You can load a custom font if needed. Load the font as a Hugo `Resource` and set
```go-html-template
-{{ $font := resources.Get "https://github.com/google/fonts/raw/main/apache/roboto/static/Roboto-Black.ttf" }}
+{{ $font := resources.GetRemote "https://github.com/google/fonts/raw/main/apache/roboto/static/Roboto-Black.ttf" }}
{{ $img := resources.Get "/images/background.png"}}
{{ $img = $img.Filter (images.Text "Hugo rocks!" (dict
"font" $font
diff --git a/docs/content/en/functions/param.md b/docs/content/en/functions/param.md
index 5387647d2..4f1764814 100644
--- a/docs/content/en/functions/param.md
+++ b/docs/content/en/functions/param.md
@@ -1,40 +1,47 @@
---
title: .Param
-description: Calls page or site variables into your template.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-04-30
-keywords: ["front matter"]
+description: Returns a page parameter, falling back to a site parameter if present.
+signature: ['.Param KEY']
categories: [functions]
+keywords: ['front matter', 'params']
menu:
docs:
- parent: "functions"
-toc:
-signature: [".Param KEY"]
-workson: []
-hugoversion:
-relatedfuncs: [default]
-deprecated: false
-draft: false
+ parent: 'functions'
aliases: []
---
-In Hugo, you can declare [site-wide params][sitevars] (i.e. in your [configuration]), as well as params for [individual pages][pagevars].
+The `.Param` method on `.Page` looks for the given `KEY` in page parameters, and returns the corresponding value. If it cannot find the `KEY` in page parameters, it looks for the `KEY` in site parameters. If it cannot find the `KEY` in either location, the `.Param` method returns `nil`.
-A common use case is to have a general value for the site and a more specific value for some of the pages (e.g., an image).
+Site and theme developers commonly set parameters at the site level, allowing content authors to override those parameters at the page level.
-You can use the `.Param` method to call these values into your template. The following will first look for an `image` param in a specific content's [front matter]. If not found, Hugo will look for an `image` param in your site's configuration:
+For example, to show a table of contents on every page, but allow authors to hide the table of contents as needed:
-```
-$.Param "image"
-```
+**Configuration**
-{{% note %}}
-The `Param` method may not consider empty strings in a content's front matter as "not found." If you are setting preconfigured front matter fields to empty strings using Hugo's archetypes, it may be best to use the [`default` function](/functions/default/) instead of `Param`. See the [related issue on GitHub](https://github.com/gohugoio/hugo/issues/3366).
-{{% /note %}}
+{{< code-toggle file="config" copy=false >}}
+[params]
+display_toc = true
+{{< /code-toggle >}}
+**Content**
-[configuration]: /getting-started/configuration/
-[front matter]: /content-management/front-matter/
-[pagevars]: /variables/page/
-[sitevars]: /variables/site/
+{{< code-toggle file="content/about.md" fm=true copy=false >}}
+title = 'About'
+date = 2023-01-01
+draft = false
+display_toc = false
+{{< /code-toggle >}}
+
+**Template**
+
+{{< code file="layouts/_default/single.html" copy="false" >}}
+{{ if .Param "display_toc" }}
+ {{ .TableOfContents }}
+{{ end }}
+{{< /code >}}
+
+The `.Param` method returns the value associated with the given `KEY`, regardless of whether the value is truthy or falsy. If you need to ignore falsy values, use this construct instead:
+
+{{< code file="layouts/_default/single.html" copy="false" >}}
+{{ or .Params.foo site.Params.foo }}
+{{< /code >}}
diff --git a/docs/content/en/getting-started/configuration-markup.md b/docs/content/en/getting-started/configuration-markup.md
index 4694bd439..b55bd79c4 100644
--- a/docs/content/en/getting-started/configuration-markup.md
+++ b/docs/content/en/getting-started/configuration-markup.md
@@ -32,6 +32,9 @@ For details on the extensions, refer to [this section](https://github.com/yuin/g
Some settings explained:
+hardWrap
+: By default, Goldmark ignores newlines within a paragraph. Set to `true` to render newlines as `<br>` elements.
+
unsafe
: By default, Goldmark does not render raw HTMLs and potentially dangerous links. If you have lots of inline HTML and/or JavaScript, you may need to turn this on.
diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md
index 39f27453f..3c9b42678 100644
--- a/docs/content/en/getting-started/configuration.md
+++ b/docs/content/en/getting-started/configuration.md
@@ -173,6 +173,12 @@ Pass down default configuration values (front matter) to pages in the content tr
Enable to turn relative URLs into absolute.
+### cleanDestinationDir
+
+**Default value:** false
+
+When building, removes files from destination not found in static directories.
+
### contentDir
**Default value:** "content"
@@ -231,7 +237,7 @@ Disable automatic live reloading of browser window.
**Default value:** false
-: Do not convert the url/path to lowercase.
+Do not convert the url/path to lowercase.
### enableEmoji
diff --git a/docs/content/en/getting-started/usage.md b/docs/content/en/getting-started/usage.md
index edf3e82a5..15cf46cbf 100644
--- a/docs/content/en/getting-started/usage.md
+++ b/docs/content/en/getting-started/usage.md
@@ -120,7 +120,7 @@ hugo server --navigateToChanged
As noted above, Hugo does not clear the public directory before building your site. Manually clear the contents of the public directory before each build to remove draft, expired, and future content.
{{% /note %}}
-When are ready to deploy your site, run:
+When you are ready to deploy your site, run:
```bash
hugo
diff --git a/docs/content/en/hugo-modules/use-modules.md b/docs/content/en/hugo-modules/use-modules.md
index 8870307b3..977a52bd6 100644
--- a/docs/content/en/hugo-modules/use-modules.md
+++ b/docs/content/en/hugo-modules/use-modules.md
@@ -135,3 +135,33 @@ Run `hugo mod clean` to delete the entire modules cache.
Note that you can also configure the `modules` cache with a `maxAge`, see [File Caches](/getting-started/configuration/#configure-file-caches).
Also see the [CLI Doc](/commands/hugo_mod_clean/).
+
+## Module Workspaces
+
+{{< new-in "0.109.0" >}}
+
+Workspace support was added in [Go 1.18](https://go.dev/blog/get-familiar-with-workspaces) and Hugo got solid support for it in the `v0.109.0` version.
+
+A common use case for a workspace is to simplify local development of a site with its theme modules.
+
+A workspace can be configured in a `*.work` file and activated with the [module.workspace](/hugo-modules/configuration/) setting, which for this use is commonly controlled via the `HUGO_MODULE_WORKSPACE` OS environment variable.
+
+See the [hugo.work](https://github.com/gohugoio/hugo/blob/master/hugo.work) file in the Hugo Docs repo for an example:
+
+```
+go 1.19
+
+use .
+use ../gohugoioTheme
+```
+
+Using the `use` directive, list all the modules you want to work on, pointing to its relative location. As in the example above, it's recommended to always include the main project (the ".") in the list.
+
+With that you can start the Hugo server with that workspace enabled:
+
+```
+HUGO_MODULE_WORKSPACE=hugo.work hugo server --ignoreVendorPaths "**"
+```
+
+The `--ignoreVendorPaths` flag is added above to ignore any of the vendored dependencies inside `_vendor`. If you don't use vendoring, you don't need that flag. But now the server is set up watching the files and directories in the workspace and you can see your local edits reloaded.
+
diff --git a/docs/content/en/hugo-pipes/introduction.md b/docs/content/en/hugo-pipes/introduction.md
index 116523fd5..e83741f74 100755
--- a/docs/content/en/hugo-pipes/introduction.md
+++ b/docs/content/en/hugo-pipes/introduction.md
@@ -133,6 +133,18 @@ You can also change the request method and set the request body:
Remote resources fetched with `resources.GetRemote` will be cached on disk. See [Configure File Caches](/getting-started/configuration/#configure-file-caches) for details.
+
+## Copy a Resource
+
+{{< new-in "0.100.0" >}}
+
+`resources.Copy` allows you to copy almost any Hugo `Resource` (the one exception is the `Page`), possibly most useful for renaming things:
+
+```go-html-template
+{{ $resized := $image.Resize "400x400" | resources.Copy "images/mynewname.jpg" }}
+<img src="{{ $resized.RelPermalink }}">
+```
+
## Asset directory
Asset files must be stored in the asset directory. This is `/assets` by default, but can be configured via the configuration file's `assetDir` key.
diff --git a/docs/content/en/hugo-pipes/scss-sass.md b/docs/content/en/hugo-pipes/scss-sass.md
index 169c473d2..4e39207fa 100755
--- a/docs/content/en/hugo-pipes/scss-sass.md
+++ b/docs/content/en/hugo-pipes/scss-sass.md
@@ -29,6 +29,9 @@ transpiler [string]
targetPath [string]
: If not set, the resource's target path will be the asset file original path with its extension replaced by `.css`.
+vars [map]
+: Map of key/value pairs that will be available in the `hugo:vars` namespace, e.g. with `@use "hugo:vars" as v;` or (globally) with `@import "hugo:vars";` {{< new-in "0.109.0" >}}
+
outputStyle [string]
: Default is `nested` (LibSass) and `expanded` (Dart Sass). Other available output styles for LibSass are `expanded`, `compact` and `compressed`. Dart Sass only supports `expanded` and `compressed`.
diff --git a/docs/content/en/templates/single-page-templates.md b/docs/content/en/templates/single-page-templates.md
index 2b0cfe0e2..925f97b03 100644
--- a/docs/content/en/templates/single-page-templates.md
+++ b/docs/content/en/templates/single-page-templates.md
@@ -6,7 +6,7 @@ date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-04-06
categories: [templates]
-keywords: [page,templates]
+keywords: [page, templates]
menu:
docs:
parent: "templates"
@@ -32,6 +32,7 @@ This single page template makes use of Hugo [base templates], the [`.Format` fun
{{< code file="layouts/posts/single.html" download="single.html" >}}
{{ define "main" }}
+
<section id="main">
<h1 id="title">{{ .Title }}</h1>
<div>
@@ -46,20 +47,20 @@ This single page template makes use of Hugo [base templates], the [`.Format` fun
<h4 id="date"> {{ .Date.Format "Mon Jan 2, 2006" }} </h4>
<h5 id="wordcount"> {{ .WordCount }} Words </h5>
</section>
- {{ with .Params.topics }}
- <ul id="topics">
- {{ range . }}
- <li><a href="{{ "topics" | absURL}}{{ . | urlize }}">{{ . }}</a> </li>
+ {{ with .GetTerms "topics" }}
+ <ul id="topics">
+ {{ range . }}
+ <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
+ {{ end }}
+ </ul>
{{ end }}
- </ul>
- {{ end }}
- {{ with .Params.tags }}
- <ul id="tags">
- {{ range . }}
- <li> <a href="{{ "tags" | absURL }}{{ . | urlize }}">{{ . }}</a> </li>
+ {{ with .GetTerms "tags" }}
+ <ul id="tags">
+ {{ range . }}
+ <li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
+ {{ end }}
+ </ul>
{{ end }}
- </ul>
- {{ end }}
</div>
<div>
{{ with .PrevInSection }}
@@ -81,7 +82,7 @@ To easily generate new instances of a content type (e.g., new `.md` files in a s
[content type]: /content-management/types/
[directory structure]: /getting-started/directory-structure/
[dry]: https://en.wikipedia.org/wiki/Don%27t_repeat_yourself
-[`.Format` function]: /functions/format/
+[`.format` function]: /functions/format/
[front matter]: /content-management/front-matter/
[pagetaxonomy]: /templates/taxonomy-templates/#display-a-single-piece-of-contents-taxonomies
[pagevars]: /variables/page/
diff --git a/docs/content/en/tools/frontends.md b/docs/content/en/tools/frontends.md
index 9f52c4c67..7ad44df53 100644
--- a/docs/content/en/tools/frontends.md
+++ b/docs/content/en/tools/frontends.md
@@ -26,5 +26,4 @@ toc: false
## Commercial Services
- [DATOCMS](https://www.datocms.com) DatoCMS is a fully customizable administrative area for your static websites. Use your favorite website generator, let your clients publish new content independently, and the host the site anywhere you like.
-- [Forestry.io](https://forestry.io/). Forestry is a git-backed CMS for Hugo, Gatsby, Jekyll and VuePress websites with support for GitHub, GitLab, Bitbucket and Azure Devops. Forestry provides a nice user interface to edit and model content for non technical editors. It supports S3, Cloudinary and Netlify Large Media integrations for storing media. Every time an update is made via the CMS, Forestry will commit changes back to your repo and vice-versa.
- [CloudCannon](https://cloudcannon.com/hugo-cms/). The intuitive Git-based CMS for your Hugo website. CloudCannon syncs changes from your Git repository and pushes content changes back, so your development and content teams are always in sync. Edit all of your content on the page with visual editing, build entire pages with reusable custom components and then publish confidently.
diff --git a/docs/content/zh/_index.md b/docs/content/zh/_index.md
deleted file mode 100644
index d54cb3436..000000000
--- a/docs/content/zh/_index.md
+++ /dev/null
@@ -1,49 +0,0 @@
----
-title: "世界上最快的网站构建框架"
-date: 2017-03-02T12:00:00-05:00
-features:
- - heading: 飞快的速度
- image_path: /images/icon-fast.svg
- tagline: 摩登发布
- copy: Hugo 是同类中最快的工具。生成一页小于 1ms,生成一个站点平均不超过 1s。
-
- - heading: 强大的内容管理
- image_path: /images/icon-content-management.svg
- tagline: 灵活的规则。Hugo 是一个设计师的梦想。
- copy: Hugo 支持无限的内容类型、分类、菜单、动态 API 驱动的内容,以及更多,都不需要插件。
-
- - heading: 短代码
- image_path: /images/icon-shortcodes.svg
- tagline: Hugo 短代码是 Markdown 隐藏的强大功能。
- copy: 我们喜欢美丽简洁的 markdown 语法,但是有时候我们也想要更灵活一些。Hugo 短代码允许既美丽又灵活。
-
- - heading: 内置模板
- image_path: /images/icon-built-in-templates.svg
- tagline: Hugo 有通用的模式让你快速的完成工作。
- copy: Hugo 平台预置的模板会快速实现搜索引擎优化、评论、分析和其他的功能。一行代码,你就完成了。
-
- - heading: 多语言和国际化
- image_path: /images/icon-multilingual2.svg
- tagline: 多语言制作
- copy: Hugo 为多语言站点提供了完整的国际化支持,并且具有与 Hugo 用户在单语言站点中喜爱的相同的简单开发体验。
-
- - heading: 自定义输出
- image_path: /images/icon-custom-outputs.svg
- tagline: HTML 不够用吗?
- copy: Hugo 允许您以多种格式输出内容,包括 JSON 或 AMP,并且可以很容易地创建自己的内容。
-sections:
- - heading: "100 多个主题"
- cta: 看看 Hugo 的主题
- link: https://themes.gohugo.io/
- color_classes: bg-accent-color white
- image: /images/homepage-screenshot-hugo-themes.jpg
- copy: "Hugo 提供了一个强大的主题系统,易于实现,但能够生成即使是最复杂的网站。"
- - heading: "功能模板"
- cta: 开始吧。
- link: templates/
- color_classes: bg-primary-color-light black
- image: /images/home-page-templating-example.png
- copy: "Hugo 基于 Go 的模板提供了恰当的方法来生成从简单到复杂的任何东西。如果你喜欢 Jade/Pug 类似的语法,你也可以使用 Amber、Ace 或三种任意组合。"
----
-
-Hugo 是最受欢迎的开源静态站点生成器之一。凭借惊人的速度和灵活性,Hugo 使建设网站的乐趣再现。
diff --git a/docs/content/zh/about/_index.md b/docs/content/zh/about/_index.md
deleted file mode 100644
index bf19807d9..000000000
--- a/docs/content/zh/about/_index.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: 关于 Hugo
-linktitle: 概览
-description: Hugo 的特色、规划、许可和动力。
-date: 2018-04-26
-publishdate: 2018-04-26
-lastmod: 2018-04-26
-categories: []
-keywords: []
-menu:
- docs:
- parent: "about"
- weight: 1
-weight: 1
-draft: false
-aliases: [/about-hugo/,/docs/]
-toc: false
----
-
-Hugo 不是一般的静态网站生成器。
diff --git a/docs/content/zh/content-management/_index.md b/docs/content/zh/content-management/_index.md
deleted file mode 100644
index 2f4b198c1..000000000
--- a/docs/content/zh/content-management/_index.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: 内容管理
-linkTitle: 内容管理概览
-description: Hugo 可以管理大型的静态网站,支持骨架、内容类型、菜单、引用、概要等等。
-date: 2018-04-23
-publishdate: 2018-04-23
-lastmod: 2018-04-23
-menu:
- docs:
- parent: content-management
- weight: 1
-keywords: [source, organization]
-categories: [content management]
-weight: 01 #rem
-aliases: [/content/,/content/organization]
-toc: false
-isCJKLanguage: true
----
-
-一个实用的静态网站生成器,需要超越“文件头” (front matter) 和模板的等基本功能,才能兼备可伸缩性和可管理性,满足用户所需。Hugo 不仅是给开发者设计的,也同样适用于内容管理员和写作人员。
diff --git a/docs/content/zh/documentation.md b/docs/content/zh/documentation.md
deleted file mode 100644
index 1575fd375..000000000
--- a/docs/content/zh/documentation.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-title: Hugo 说明文档
-linktitle: Hugo
-description: Hugo 是世界上最快的静态网站引擎。它是用 Go (即 Golang) 编程语言所写成,由 bep、spf13 和朋友们共同开发。
-date: 2017-02-01
-publishdate: 2017-02-01
-menu:
- main:
- parent: "section name"
- weight: 01
-weight: 01 #rem
-draft: false
-slug:
-aliases: []
-toc: false
-layout: documentation-home
-isCJKLanguage: true
----
-Hugo 是世界上最快的静态网站引擎。它是用 Go (即 Golang) 编程语言所写成,由 [bep](https://github.com/bep)、[spf13](https://github.com/spf13) 和[朋友们](https://github.com/gohugoio/hugo/graphs/contributors)共同开发。
-
-下面是我们说明文档中最常用和实用的章节:
diff --git a/docs/content/zh/news/_index.md b/docs/content/zh/news/_index.md
deleted file mode 100644
index 286d32e19..000000000
--- a/docs/content/zh/news/_index.md
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "Hugo 新闻"
-aliases: [/release-notes/]
----
diff --git a/docs/content/zh/templates/_index.md b/docs/content/zh/templates/_index.md
deleted file mode 100644
index 3cd8df436..000000000
--- a/docs/content/zh/templates/_index.md
+++ /dev/null
@@ -1,19 +0,0 @@
----
-title: 模板 Templates
-linktitle: 模板概览
-description: Go templating, template types and lookup order, shortcodes, and data.
-date: 2017-02-01
-publishdate: 2017-02-01
-lastmod: 2017-02-01
-menu:
- docs:
- parent: "templates"
- weight: 01
-weight: 01 #rem
-categories: [templates]
-keywords: []
-draft: false
-aliases: [/templates/overview/,/templates/content]
-toc: false
-notesforauthors:
----
diff --git a/docs/content/zh/templates/base.md b/docs/content/zh/templates/base.md
deleted file mode 100644
index bf0e9165a..000000000
--- a/docs/content/zh/templates/base.md
+++ /dev/null
@@ -1,131 +0,0 @@
----
-title: Base 模板 and Blocks
-linktitle:
-description: The base and block constructs allow you to define the outer shell of your master templates (i.e., the chrome of the page).
-date: 2017-02-01
-publishdate: 2018-08-11
-lastmod: 2017-02-01
-categories: [templates,fundamentals]
-keywords: [blocks,base]
-menu:
- docs:
- parent: "templates"
- weight: 20
-weight: 20
-sections_weight: 20
-draft: false
-aliases: [/templates/blocks/,/templates/base-templates-and-blocks/]
-toc: true
----
-
-The `block` keyword allows you to define the outer shell of your pages' one or more master template(s) and then fill in or override portions as necessary.
-
-{{< youtube QVOMCYitLEc >}}
-
-## Base Template Lookup Order
-
-The [lookup order][lookup] for base templates is as follows:
-
-1. `/layouts/section/<TYPE>-baseof.html`
-2. `/themes/<THEME>/layouts/section/<TYPE>-baseof.html`
-3. `/layouts/<TYPE>/baseof.html`
-4. `/themes/<THEME>/layouts/<TYPE>/baseof.html`
-5. `/layouts/section/baseof.html`
-6. `/themes/<THEME>/layouts/section/baseof.html`
-7. `/layouts/_default/<TYPE>-baseof.html`
-8. `/themes/<THEME>/layouts/_default/<TYPE>-baseof.html`
-9. `/layouts/_default/baseof.html`
-10. `/themes/<THEME>/layouts/_default/baseof.html`
-
-Variables are denoted by capitalized text set within `<>`. Note that Hugo's default behavior is for `type` to inherit from `section` unless otherwise specified.
-
-### Example Base Template Lookup Order
-
-As an example, let's assume your site is using a theme called "mytheme" when rendering the section list for a `posts` section. Hugo picks `layout/section/posts.html` as the template for [rendering the section]. The `{{define}}` block in this template tells Hugo that the template is an extension of a base template.
-
-Here is the lookup order for the `posts` base template:
-
-1. `/layouts/section/posts-baseof.html`
-2. `/themes/mytheme/layouts/section/posts-baseof.html`
-3. `/layouts/posts/baseof.html`
-4. `/themes/mytheme/layouts/posts/baseof.html`
-5. `/layouts/section/baseof.html`
-6. `/themes/mytheme/layouts/section/baseof.html`
-7. `/layouts/_default/posts-baseof.html`
-8. `/themes/mytheme/layouts/_default/posts-baseof.html`
-9. `/layouts/_default/baseof.html`
-10. `/themes/mytheme/layouts/_default/baseof.html`
-
-## Define the Base Template
-
-The following defines a simple base template at `_default/baseof.html`. As a default template, it is the shell from which all your pages will be rendered unless you specify another `*baseof.html` closer to the beginning of the lookup order.
-
-{{< code file="layouts/_default/baseof.html" download="baseof.html" >}}
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8">
- <title>{{ block "title" . }}
- <!-- Blocks may include default content. -->
- {{ .Site.Title }}
- {{ end }}</title>
- </head>
- <body>
- <!-- Code that all your templates share, like a header -->
- {{ block "main" . }}
- <!-- The part of the page that begins to differ between templates -->
- {{ end }}
- {{ block "footer" . }}
- <!-- More shared code, perhaps a footer but that can be overridden if need be in -->
- {{ end }}
- </body>
-</html>
-{{< /code >}}
-
-## Override the Base Template
-
-From the above base template, you can define a [default list template][hugolists]. The default list template will inherit all of the code defined above and can then implement its own `"main"` block from:
-
-{{< code file="layouts/_default/list.html" download="list.html" >}}
-{{ define "main" }}
- <h1>Posts</h1>
- {{ range .Pages }}
- <article>
- <h2>{{ .Title }}</h2>
- {{ .Content }}
- </article>
- {{ end }}
-{{ end }}
-{{< /code >}}
-
-This replaces the contents of our (basically empty) "main" block with something useful for the list template. In this case, we didn't define a `"title"` block, so the contents from our base template remain unchanged in lists.
-
-{{% warning %}}
-Code that you put outside the block definitions *can* break your layout. This even includes HTML comments. For example:
-
-```
-<!-- Seemingly harmless HTML comment..that will break your layout at build -->
-{{ define "main" }}
-...your code here
-{{ end }}
-```
-[See this thread from the Hugo discussion forums.](https://discourse.gohugo.io/t/baseof-html-block-templates-and-list-types-results-in-empty-pages/5612/6)
-{{% /warning %}}
-
-The following shows how you can override both the `"main"` and `"title"` block areas from the base template with code unique to your [default single page template][singletemplate]:
-
-{{< code file="layouts/_default/single.html" download="single.html" >}}
-{{ define "title" }}
- <!-- This will override the default value set in baseof.html; i.e., "{{.Site.Title}}" in the original example-->
- {{ .Title }} &ndash; {{ .Site.Title }}
-{{ end }}
-{{ define "main" }}
- <h1>{{ .Title }}</h1>
- {{ .Content }}
-{{ end }}
-{{< /code >}}
-
-[hugolists]: /templates/lists
-[lookup]: /templates/lookup-order/
-[rendering the section]: /templates/section-templates/
-[singletemplate]: /templates/single-page-templates/
diff --git a/docs/content/zh/tools/_index.md b/docs/content/zh/tools/_index.md
deleted file mode 100644
index a3de7dc76..000000000
--- a/docs/content/zh/tools/_index.md
+++ /dev/null
@@ -1,25 +0,0 @@
----
-title:  开发者工具
-linktitle:  开发者工具概览
-description: 除了 Hugo 强大的命令外,对于 Hugo 开发者还有大量社区开发的工具链。
-date: 2018-05-29
-publishdate: 2018-05-29
-lastmod: 2018-05-29
-categories: [developer tools]
-keywords: []
-menu:
- docs:
- parent: "tools"
- weight: 01
-weight: 01
-sections_weight: 01
-draft: false
-aliases: [/tools/]
----
-
-Hugo 最强大的在于它是活跃的——并总在发展的——开发者社区。除了在[语法高亮][syntax] 中提到的 `highlight` 简码外,该章节中的这些工具和其它项目特色都是由商业服务和开源项目提供,很多就是由像你一样的 Hugo 开发者开发的。
-
-[查看 Hugo 的流行程度与其它静态网站生成器的比较。][staticgen]
-
-[staticgen]: https://staticgen.com
-[syntax]: /tools/syntax-highlighting/
diff --git a/docs/content/zh/tools/search.md b/docs/content/zh/tools/search.md
deleted file mode 100644
index 26b25ea2a..000000000
--- a/docs/content/zh/tools/search.md
+++ /dev/null
@@ -1,31 +0,0 @@
----
-title: 搜索你的 Hugo 网站
-linktitle: 搜索
-description: 为你最新添加的 Hugo 网站看一些开源和商业搜索选择。
-date: 2018-05-29
-publishdate: 2018-05-29
-lastmod: 2018-05-29
-categories: [developer tools]
-keywords: [search,tools]
-menu:
- docs:
- parent: "tools"
- weight: 60
-weight: 60
-sections_weight: 60
-draft: false
-aliases: []
-toc: true
----
-
-静态网站还有动态搜索功能?是的。作为可选方案,来自 Google 或