Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/.codespellrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[codespell]

# Comma separated list of dirs to be skipped.
skip = *.ai,chroma.css,chroma_dark.css,.cspell.json
skip = *.ai,chroma.css,chroma_dark.css,.cspell.json,./data/docs.yaml

# Comma separated list of words to be ignored. Words must be lowercased.
ignore-words-list = abl,edn,januar,te,trys,ue,womens
Expand Down
4 changes: 2 additions & 2 deletions docs/.cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"**/emojis.md",
"**/commands/*",
"**/showcase/*",
"**/tools/*",
"data/docs.yaml"
"**/tools/*"
],
"ignoreRegExpList": [
"# cspell: ignore fenced code blocks",
Expand Down Expand Up @@ -182,6 +181,7 @@
"dring",
"fleqn",
"inor",
"iptc",
"jausten",
"jdoe",
"jsmith",
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
.hugo_build.lock
.hvm
/.idea
/.vscode
/dist
Expand Down
5 changes: 4 additions & 1 deletion docs/.markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ config:
url_inline: false
MD055:
style: consistent
MD056: true
MD056: false # interferes with Markdown attributes
# MD057 deprecated
MD058: true
MD059:
Expand All @@ -89,3 +89,6 @@ config:
- here
- link
- more
MD060:
aligned_delimiter: false
style: any
25 changes: 25 additions & 0 deletions docs/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Theme

### Role
You are an expert front-end and Tailwind CSS developer. Your primary goal is to build reliable, readable, and scalable user interfaces using the existing project structure and design system.

### Directives
* **ALWAYS** use existing Tailwind utility classes for styling.
* **NEVER** write raw CSS in `.css` files unless absolutely necessary for a non-utility-based global reset.
* **NEVER** use inline styles (e.g., `<div style="...">`).

### Project Knowledge

* **Tech Stack:** Hugo (static site generator), AlpineJS, Tailwind CSS. Icons from https://heroicons.com/.
* **Core Files and Directories:**
- `hugo.toml`: Hugo configuration file.
- `assets/css/styles.css`: Main CSS file with Tailwind directives.
- `assets/js/main.js`: Main JavaScript with AlpineJS configuration.
- `package.json`: Project dependencies and scripts.
- `content/`: Directory for markdown content files.
- `layouts/`: Directory for Hugo templates and partials.
- `layouts/_partials/icons.html`: SVG icon sprites.




1 change: 1 addition & 0 deletions docs/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
2 changes: 0 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@ Please see the [contributing] section for guidelines, examples, and process.
npm i
hugo server
```

**Note:** We're working on removing the need to run `npm i` for local development. Stay tuned.
11 changes: 9 additions & 2 deletions docs/assets/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@

/* Fonts. */
--font-sans:
"Mulish", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
"Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol", "Noto Color Emoji";
}

html {
Expand Down Expand Up @@ -134,3 +135,9 @@ body {
:not(pre) > code {
white-space: nowrap;
}

/* Utility class for tables to prevent word wrapping in the first column. */
.no-wrap-first-col td:first-child,
.no-wrap-first-col th:first-child {
white-space: nowrap;
}
10 changes: 10 additions & 0 deletions docs/assets/js/alpinejs/stores/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ export const navStore = (Alpine) => ({
atTop: true,
},

mobileMenu: {
open: false,
toggle() {
this.open = !this.open;
},
close() {
this.open = false;
},
},

userSettings: {
// settings gets persisted between page navigations.
settings: Alpine.$persist({
Expand Down
2 changes: 0 additions & 2 deletions docs/content/en/_common/functions/js/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,9 @@ sourcesContent
: (`bool`) Whether to include the content of the source files in the source map. By default, this is `true`.

JSX
: {{< new-in 0.124.0 />}}
: (`string`) How to handle/transform JSX syntax. One of: `transform`, `preserve`, `automatic`. Default is `transform`. Notably, the `automatic` transform was introduced in React 17+ and will cause the necessary JSX helper functions to be imported automatically. See <https://esbuild.github.io/api/#jsx>.

JSXImportSource
: {{< new-in 0.124.0 />}}
: (`string`) Which library to use to automatically import its JSX helper functions from. This only works if `JSX` is set to `automatic`. The specified library needs to be installed through npm and expose certain exports. See <https://esbuild.github.io/api/#jsx-import-source>.

The combination of `JSX` and `JSXImportSource` is helpful if you want to use a non-React JSX library like Preact, e.g.:
Expand Down
10 changes: 6 additions & 4 deletions docs/content/en/_common/installation/01-editions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
_comment: Do not remove front matter.
---

Hugo is available in three editions: standard, extended, and extended/deploy. While the standard edition provides core functionality, the extended and extended/deploy editions offer advanced features.
## Editions

Hugo offers a standard edition with core features, plus extended and extended/deploy editions with more. Use the standard edition unless you need the features below.

<!-- TODO Remove the transpiler row somewhere around v0.166.0 -->

Feature|extended edition|extended/deploy edition
:--|:-:|:-:
Encode to the WebP format when [processing images]. You can decode WebP images with any edition.|:heavy_check_mark:|:heavy_check_mark:
[Transpile Sass to CSS] using the embedded LibSass transpiler. You can use the [Dart Sass] transpiler with any edition.|:heavy_check_mark:|:heavy_check_mark:
[Transpile Sass to CSS] via embedded LibSass. Note that embedded LibSass was deprecated in v0.153.0 and will be removed in a future release. Use the [Dart Sass] transpiler instead, which is compatible with any edition.|:heavy_check_mark:|:heavy_check_mark:
Deploy your site directly to a Google Cloud Storage bucket, an AWS S3 bucket, or an Azure Storage container. See&nbsp;[details].|:x:|:heavy_check_mark:

[dart sass]: /functions/css/sass/#dart-sass
[processing images]: /content-management/image-processing/
[transpile sass to css]: /functions/css/sass/
[details]: /host-and-deploy/deploy-with-hugo-deploy/
13 changes: 7 additions & 6 deletions docs/content/en/_common/installation/02-prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Git is required to:
- Use the [Hugo Modules] feature
- Install a theme as a Git submodule
- Access [commit information] from a local Git repository
- Host your site with services such as [CloudCannon], [Cloudflare Pages], [GitHub Pages], [GitLab Pages], and [Netlify]
- Host your site on [CI/CD](g) platforms such as [Cloudflare][], [GitHub Pages][], [GitLab Pages][], [Netlify][], [Render][], or [Vercel][]

Go is required to:

Expand All @@ -27,16 +27,17 @@ Please refer to the relevant documentation for installation instructions:
- [Go][go install]
- [Dart Sass][dart sass install]

[cloudcannon]: https://cloudcannon.com/
[cloudflare pages]: https://pages.cloudflare.com/
[Cloudflare]: /host-and-deploy/host-on-cloudflare/
[commit information]: /methods/page/GitInfo
[dart sass install]: /functions/css/sass/#dart-sass
[dart sass]: https://sass-lang.com/dart-sass
[git install]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
[git]: https://git-scm.com/
[github pages]: https://pages.github.com/
[gitlab pages]: https://docs.gitlab.com/ee/user/project/pages/
[GitHub Pages]: /host-and-deploy/host-on-github-pages/
[GitLab Pages]: /host-and-deploy/host-on-gitlab-pages/
[go install]: https://go.dev/doc/install
[go]: https://go.dev/
[hugo modules]: /hugo-modules/
[netlify]: https://www.netlify.com/
[Netlify]: /host-and-deploy/host-on-netlify/
[Render]: /host-and-deploy/host-on-render/
[Vercel]: /host-and-deploy/host-on-vercel/
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
_comment: Do not remove front matter.
---

To use this method you must first select a specific [output format](g) from a page's [`OutputFormats`][] collection using the [`Get`][] or [`Canonical`][] methods.

[`Canonical`]: /methods/page/outputformats/#canonical
[`Get`]: /methods/page/outputformats/#get
[`OutputFormats`]: /methods/page/outputformats/
35 changes: 0 additions & 35 deletions docs/content/en/_common/methods/page/output-format-methods.md

This file was deleted.

73 changes: 55 additions & 18 deletions docs/content/en/_common/methods/resource/processing-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,72 @@
_comment: Do not remove front matter.
---

## Process specification
## Processing specification

The process specification is a space-delimited, case-insensitive list of one or more of the following in any sequence:
The processing specification is a space-delimited, case-insensitive list containing one or more of the following options in any sequence:

action
: Applicable to the [`Process`](/methods/resource/process) method only. Specify zero or one of `crop`, `fill`, `fit`, or `resize`. If you specify an action you must also provide dimensions.

dimensions
: Provide width _or_ height when using the [`Resize`](/methods/resource/resize) method, else provide both width _and_ height. See&nbsp;[details](/content-management/image-processing/#dimensions).
: Specify one of `crop`, `fill`, `fit`, or `resize`. This is applicable to the [`Process`][] method and the [`images.Process`][] filter. If you specify an action, you must also provide dimensions.

anchor
: Use with the [`Crop`](/methods/resource/crop) and [`Fill`](/methods/resource/fill) methods. Specify zero or one of `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. Default is `Smart`. See&nbsp;[details](/content-management/image-processing/#anchor).
: The focal point used when cropping or filling an image. Valid options include `TopLeft`, `Top`, `TopRight`, `Left`, `Center`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`. The `Smart` option utilizes the [`smartcrop.js`][] library to identify the most interesting area of the image. This defaults to the [`anchor`][] parameter in your site configuration.

rotation
: Typically specify zero or one of `r90`, `r180`, or `r270`. Also supports arbitrary rotation angles. See&nbsp;[details](/content-management/image-processing/#rotation).
background color
: The background color used when converting transparent images to formats that do not support transparency, such as PNG to JPEG. This color also fills the empty space created when rotating an image by a non-orthogonal angle if the space is not transparent and a background color is not specified in the processing specification. The value must be an RGB [hexadecimal color][]. This defaults to the [`bgColor`][] parameter in your site configuration.

target format
: Specify zero or one of `gif`, `jpeg`, `png`, `tiff`, or `webp`. See&nbsp;[details](/content-management/image-processing/#target-format).
compression
: {{< new-in 0.153.5 />}}
: The encoding strategy used for the image. Options are `lossy` or `lossless`. Note that `lossless` is only supported by the WebP format. This defaults to the [`compression`][] parameter in your site configuration.

quality
: Applicable to JPEG and WebP images. Optionally specify `qN` where `N` is an integer in the range [0, 100]. Default is `75`. See&nbsp;[details](/content-management/image-processing/#quality).
dimensions
: The dimensions of the resulting image, in pixels. The format is `WIDTHxHEIGHT` where `WIDTH` and `HEIGHT` are whole numbers. When resizing an image, you may specify only the width (such as `600x`) or only the height (such as `x400`) for proportional scaling. Specifying both width and height when resizing an image may result in non-proportional scaling. When cropping, fitting, or filling, you must provide both width and height such as `600x400`.

format
: The format of the resulting image. Valid options include `bmp`, `gif`, `jpeg`, `png`, `tiff`, or `webp`. This defaults to the format of the source image.

hint
: Applicable to WebP images and equivalent to the `-preset` flag for the [`cwebp`] encoder. Specify zero or one of `drawing`, `icon`, `photo`, `picture`, or `text`. Default is `photo`. See&nbsp;[details](/content-management/image-processing/#hint).
: The encoding preset used when processing WebP images, equivalent to the `-preset` flag for the [`cwebp`][] CLI. Valid options include `drawing`, `icon`, `photo`, `picture`, or `text`. This defaults to the [`hint`][] parameter in your site configuration.

[`cwebp`]: https://developers.google.com/speed/webp/docs/cwebp
Value|Example
:--|:--
`drawing`|Hand or line drawing with high-contrast details
`icon`|Small colorful image
`photo`|Outdoor photograph with natural lighting
`picture`|Indoor photograph such as a portrait
`text`|Image that is primarily text

background color
: When converting a PNG or WebP with transparency to a format that does not support transparency, optionally specify a background color using a 3-digit or a 6-digit hexadecimal color code. Default is `#ffffff` (white). See&nbsp;[details](/content-management/image-processing/#background-color).
quality
: The visual fidelity of the image, applicable to JPEG and WebP formats when using `lossy` compression. The format is `qQUALITY` where `QUALITY` is a whole number between `1` and `100`, inclusive. Lower numbers prioritize smaller file size, while higher numbers prioritize visual clarity. This defaults to the [`quality`][] parameter in your site configuration.

resampling filter
: Typically specify zero or one of `Box`, `Lanczos`, `CatmullRom`, `MitchellNetravali`, `Linear`, or `NearestNeighbor`. Other resampling filters are available. See&nbsp;[details](/content-management/image-processing/#resampling-filter).
: The algorithm used to calculate new pixels when resizing, fitting, or filling an image. Common options include `box`, `lanczos`, `catmullRom`, `mitchellNetravali`, `linear`, or `nearestNeighbor`. This defaults to the [`resampleFilter`][] parameter in your site configuration.

Filter|Description
:--|:--
`box`|Simple and fast averaging filter appropriate for downscaling
`lanczos`|High-quality resampling filter for photographic images yielding sharp results
`catmullRom`|Sharp cubic filter that is faster than the Lanczos filter while providing similar results
`mitchellNetravali`|Cubic filter that produces smoother results with less ringing artifacts than CatmullRom
`linear`|Bilinear resampling filter, produces smooth output, faster than cubic filters
`nearestNeighbor`|Fastest resampling filter, no antialiasing

Refer to the [source documentation][] for a complete list of available resampling filters. If you wish to improve image quality at the expense of performance, you may wish to experiment with the alternative filters.

rotation
: The number of whole degrees to rotate an image counter-clockwise. The format is `rDEGREES` where `DEGREES` is a whole number. Hugo performs rotation before any other transformations, so your [target dimensions](#dimensions) and any [anchor](#anchor) should refer to the image orientation after rotation. Use `r90`, `r180`, or `r270` for orthogonal rotations, or arbitrary angles such as `r45`. To rotate clockwise, use a negative number such as `r-45`. To automatically rotate an image based on its Exif orientation tag, use the [`images.AutoOrient`][] filter instead of manual rotation.

Rotating by non-orthogonal values increases the image extents to fit the rotated corners. For formats supporting alpha channels such as PNG or WebP, this resulting empty space is transparent by default. If the target format does not support transparency such as JPEG, or if you explicitly specify a [background color](#background-color) in the processing specification, the space is filled. If a color is required but not specified in the processing string, it defaults to the [`bgColor`][] parameter in your site configuration.

[`anchor`]: /configuration/imaging/#anchor
[`bgcolor`]: /configuration/imaging/#bgcolor
[`compression`]: /configuration/imaging/#compression
[`cwebp`]: https://developers.google.com/speed/webp/docs/cwebp
[`hint`]: /configuration/imaging/#hint
[`images.AutoOrient`]: /functions/images/autoorient/
[`images.Process`]: /functions/images/process/
[`Process`]: /methods/resource/process
[`quality`]: /configuration/imaging/#quality
[`resampleFilter`]: /configuration/imaging/#resamplefilter
[`smartcrop.js`]: https://github.com/jwagner/smartcrop.js
[hexadecimal color]: https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color
[source documentation]: https://github.com/disintegration/imaging#image-resizing
2 changes: 0 additions & 2 deletions docs/content/en/_common/render-hooks/pageinner.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ _comment: Do not remove front matter.

## PageInner details

{{< new-in 0.125.0 />}}

The primary use case for `PageInner` is to resolve links and [page resources](g) relative to an included `Page`. For example, create an "include" shortcode to compose a page from multiple content files, while preserving a global context for footnotes and the table of contents:

```go-html-template {file="layouts/_shortcodes/include.html" copy=true}
Expand Down
6 changes: 5 additions & 1 deletion docs/content/en/about/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ weight: 20

## Content management

[Multidimensional content model]
: Generate pages across any combination of language, role, and version from a single source. This allows a single piece of content to be published to multiple [sites](g) within your project, removing the need to duplicate files for different audiences or versions.

[Content adapters]
: 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.

Expand All @@ -78,7 +81,7 @@ weight: 20
## Asset pipelines

[Image processing]
: Convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract EXIF data.
: Convert, resize, crop, rotate, adjust colors, apply filters, overlay text and images, and extract metadata.

[JavaScript bundling]
: Transpile TypeScript and JSX to JavaScript, bundle, tree shake, minify, create source maps, and perform SRI hashing.
Expand Down Expand Up @@ -120,6 +123,7 @@ weight: 20
[Syntax highlighting]: /content-management/syntax-highlighting/
[Shortcodes]: /content-management/shortcodes/

[Multidimensional content model]: /quick-reference/glossary/#sites-matrix
[Content adapters]: /content-management/content-adapters/
[Taxonomies]: /content-management/taxonomies/
[Data]: /content-management/data-sources/
Expand Down
Loading
Loading