在 Linux、macOS、Windows 等平台上安装 Hugo 的单一可执行文件。(Install Hugo’s single executable on Linux, macOS, Windows, and more.)
[Multilingual] 多种语言
针对每种语言和地区对项目进行本地化,包括翻译、图像、日期、货币、数字、百分比和排序顺序。Hugo 的多语言框架支持单主机和多主机配置。(Localize your project for each language and region, including translations, images, dates, currencies, numbers, percentages, and collation sequence. Hugo’s multilingual framework supports single-host and multihost configurations.)
[Output formats] 输出格式
Render each page of your site to one or more output formats, with granular control by page kind, section, and path. While HTML is the default output format, you can add JSON, RSS, CSV, and more. For example, create a REST API to access content.(将网站的每个页面渲染为一种或多种输出格式,并按页面类型、部分和路径进行精细控制。虽然 HTML 是默认的输出格式,但您可以添加 JSON、RSS、CSV 等。例如,创建 REST API 来访问内容。)
[Templates] 模板
Create templates using variables, functions, and methods to transform your content, resources, and data into a published page. While HTML templates are the most common, you can create templates for any output format. (使用变量、函数和方法创建模板,将您的内容、资源和数据转换为已发布的页面。虽然 HTML 模板是最常见的,但您可以为任何输出格式创建模板。
)
[Themes] 主题
Reduce development time and cost by using one of the hundreds of themes contributed by the Hugo community. Themes are available for corporate sites, documentation projects, image portfolios, landing pages, personal and professional blogs, resumes, CVs, and more.(使用 Hugo 社区提供的数百个主题之一,减少开发时间和成本。主题适用于企业网站、文档项目、图片集、登录页面、个人和专业博客、简历、履历等。)
[Modules] 模块
Reduce development time and cost by creating or importing packaged combinations of archetypes, assets, content, data, templates, translation tables, static files, or configuration settings. A module may serve as the basis for a new site, or to augment an existing site.(通过创建或导入原型、资产、内容、数据、模板、翻译表、静态文件或配置设置的打包组合来减少开发时间和成本。模块可以作为新网站的基础,也可以扩充现有网站。
)
[Privacy] 隐私
Configure your site to help comply with regional privacy regulations. (配置您的网站以帮助遵守区域隐私法规。)
[Security] (安全)
Hugo’s security model is based on the premise that template and configuration authors are trusted, but content authors are not. This model enables generation of HTML output safe against code injection. Other protections prevent “shelling out” to arbitrary applications, limit access to specific environment variables, prevent connections to arbitrary remote data sources, and more.(Hugo 的安全模型基于这样的前提:模板和配置作者是可信的,但内容作者不是。此模型可以生成安全的 HTML 输出,防止代码注入。其他保护措施包括防止“攻击”到任意应用程序、限制对特定环境变量的访问、防止连接到任意远程数据源等。)
使用 Markdown、HTML、AsciiDoc、Emacs Org Mode、Pandoc 或 reStructuredText 创建内容。Markdown 是默认内容格式,符合CommonMark和GitHub Flavored Markdown规范。 (Create your content using Markdown, HTML, AsciiDoc, Emacs Org Mode, Pandoc, or reStructuredText. Markdown is the default content format, conforming to the [CommonMark] and [GitHub Flavored Markdown] specifications.)
[Markdown attributes] Markdown 属性
将 HTML 属性(例如class)id应用于 Markdown 图像和块元素(包括块引用、围栏代码块、标题、水平规则、列表、段落和表格)。 Apply HTML attributes such as class and id to Markdown images and block elements including blockquotes, fenced code blocks, headings, horizontal rules, lists, paragraphs, and tables.
[Markdown extensions] Markdown 扩展
Leverage the embedded Markdown extensions to create tables, definition lists, footnotes, task lists, inserted text, mark text, subscripts, superscripts, and more.
[Markdown render hooks] Markdown 渲染钩子
在渲染引用块、隔离代码块、标题、图片、链接和表格时覆盖 Markdown 到 HTML 的转换。例如,将每个独立图片渲染为 HTMLfigure元素。 Override the conversion of Markdown to HTML when rendering blockquotes, fenced code blocks, headings, images, links, and tables. For example, render every standalone image as an HTML figure element.
[Diagrams] 图表
使用隔离代码块和 Markdown 渲染挂钩将图表包含在您的内容中。
Use fenced code blocks and Markdown render hooks to include diagrams in your content.
[Mathematics] 数学
使用 LaTeX 标记在 Markdown 中包含数学方程式和表达式。
Include mathematical equations and expressions in Markdown using LaTeX markup.
[Syntax highlighting]语法高亮
使用 Hugo 的嵌入式语法高亮器按语法高亮代码示例,默认情况下,Markdown 中的隔离代码块会启用该高亮器。语法高亮器支持数百种代码语言和数十种样式。
Syntactically highlight code examples using Hugo’s embedded syntax highlighter, enabled by default for fenced code blocks in Markdown. The syntax highlighter supports hundreds of code languages and dozens of styles.
[Shortcodes] 简码
Use Hugo’s embedded shortcodes, or create your own, to insert complex content. For example, use shortcodes to include audio and video elements, render tables from local or remote data sources, insert snippets from other pages, and more. 使用 Hugo 的嵌入式短代码或创建自己的短代码来插入复杂内容。例如,使用短代码包含audio和video元素、从本地或远程数据源渲染表格、插入来自其他页面的片段等等。
Create content adapters to dynamically add content when building your site. For example, use a content adapter to create pages from a remote data source such as JSON, TOML, YAML, or XML. 创建内容适配器以在构建网站时动态添加内容。例如,使用内容适配器从远程数据源(例如 JSON、TOML、YAML 或 XML)创建页面。
[Taxonomies] 分类法
Classify content to establish simple or complex logical relationships between pages. For example, create an authors taxonomy, and assign one or more authors to each page. Among other uses, the taxonomy system provides an inverted, weighted index to render a list of related pages, ordered by relevance. 对内容进行分类,以建立页面之间的简单或复杂逻辑关系。例如,创建作者分类法,并为每个页面分配一个或多个作者。除其他用途外,分类系统还提供倒排加权索引,以呈现按相关性排序的相关页面列表。
[Data] 数据
Augment your content using local or remote data sources including CSV, JSON, TOML, YAML, and XML. For example, create a shortcode to render an HTML table from a remote CSV file. 使用本地或远程数据源(包括 CSV、JSON、TOML、YAML 和 XML)扩充您的内容。例如,创建一个简码以从远程 CSV 文件呈现 HTML 表。
[Menus] 菜单
Provide rapid access to content via Hugo’s menu system, configured automatically, globally, or on a page-by-page basis. The menu system is a key component of Hugo’s multilingual architecture. 通过 Hugo 的菜单系统快速访问内容,可自动、全局或逐页配置。菜单系统是 Hugo 多语言架构的关键组件。
[URL management] URL 管理
Serve any page from any path via global configuration or on a page-by-page basis. 通过全局配置或逐页配置从任意路径提供任意页面。
Convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract EXIF data. 转换、调整大小、裁剪、旋转、调整颜色、应用过滤器、叠加文本和图像以及提取 EXIF 数据。
[JavaScript bundling] JavaScript 打包
Transpile TypeScript and JSX to JavaScript, bundle, tree shake, minify, create source maps, and perform SRI hashing. 将 TypeScript 和 JSX 转换为 JavaScript、捆绑、树摇、最小化、创建源映射并执行 SRI 哈希。
[Sass processing] Sass 处理
Transpile Sass to CSS, bundle, tree shake, minify, create source maps, perform SRI hashing, and integrate with PostCSS.将 Sass 转换为 CSS、捆绑、树摇、最小化、创建源映射、执行 SRI 散列并与 PostCSS 集成。
[Tailwind CSS processing] Tailwind CSS 处理
Compile Tailwind CSS utility classes into standard CSS, bundle, tree shake, optimize, minify, perform SRI hashing, and integrate with PostCSS. 将 Tailwind CSS 实用程序类编译为标准 CSS、捆绑、树摇、优化、最小化、执行 SRI 哈希并与 PostCSS 集成。
Reduce build time and cost by rendering a partial template once then cache the result, either globally or within a given context. For example, cache the result of an asset pipeline to prevent reprocessing on every rendered page. 通过渲染部分模板一次然后缓存结果(全局或给定上下文内)来减少构建时间和成本。例如,缓存资产管道的结果,以防止在每个渲染的页面上重新处理。
[Segmentation] 分割
Reduce build time and cost by partitioning your sites into segments. For example, render the home page and the “news section” every hour, and render the entire site once a week. 通过将网站划分为多个部分来减少构建时间和成本。例如,每小时渲染一次主页和“新闻部分”,每周渲染一次整个网站。
[Minification] 最小化
Minify HTML, CSS, and JavaScript to reduce file size, bandwidth consumption, and loading times. 缩小 HTML、CSS 和 JavaScript 以减少文件大小、带宽消耗和加载时间。