简介Hugo模板
Hugo uses Go’s
html/template
and text/template
libraries as the basis for the templating.
Read More »Hugo的查找顺序
Hugo searches for the layout to use for a given page in a well defined order, starting from the most specific.
Read More »
自定义输出格式
Hugo can output content in multiple formats, including calendar events, e-book formats, Google AMP, and JSON search indexes, or any custom text format.
Read More »
基本模板和模块
The base and block constructs allow you to define the outer shell of your master templates (i.e., the chrome of the page).
Read More »
Hugo内容的列表
Lists have a specific meaning and usage in Hugo when it comes to rendering your site homepage, section page, taxonomy list, or taxonomy terms list.
Read More »
首页模板
The homepage of a website is often formatted differently than the other pages. For this reason, Hugo makes it easy for you to define your new site’s homepage as a unique template.
Read More »
章节页面模板
Templates used for section pages are lists and therefore have all the variables and methods available to list pages.
Read More »
分类模板
Taxonomy templating includes taxonomy list pages, taxonomy terms pages, and using taxonomies in your single page templates.
Read More »
单页模板
The primary view of content in Hugo is the single view. Hugo will render every Markdown file provided with a corresponding single template.
Read More »
内容视图模板
Hugo can render alternative views of your content, which is especially useful in list and summary views.
Read More »
数据模板
In addition to Hugo’s built-in variables, you can specify your own custom data in templates or shortcodes that pull from both local and dynamic sources.
Read More »
部件模板
Partials are smaller, context-aware components in your list and page templates that can be used economically to keep your templating DRY.
Read More »
创建自己的简码
You can extend Hugo’s built-in shortcodes by creating your own using the same templating syntax as that for single and list pages.
Read More »
本地文件模板
Hugo’s
readDir
and readFile
functions make it easy to traverse your project’s directory structure and write file contents to your templates.
Read More »自定义404页
如果你知道如何创建一个页面模板,您可以创建自定义404无限的选择。
Read More »
菜单模板
Menus are a powerful but simple feature for content management but can be easily manipulated in your templates to meet your design needs.
Read More »
分页
Hugo supports pagination for your homepage, section pages, and taxonomies.
Read More »
RSS 模板
Hugo ships with its own RSS 2.0 template that requires almost no configuration, or you can create your own RSS templates.
Read More »
网站地图模板
Hugo ships with a built-in template file observing the v0.9 of the Sitemap Protocol, but you can override this template if needed.
Read More »
Robots.txt 文件
Hugo can generate a customized robots.txt in the same way as any other template.
Read More »
内置模板
Hugo ships with a group of boilerplate templates that cover the most common use cases for static websites.
Read More »
DEPRECATED - Alternative Templating Languages
DEPRECATED - Support for Ace & Amber templating has been removed in version 0.62
Read More »
模板调试
You can use Go templates’
printf
function to debug your Hugo templates. These snippets provide a quick and easy visualization of the variables available to you in different contexts.
Read More »