Skip to content

Commit

Permalink
Miscellaneous updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed Nov 5, 2023
1 parent 80b2241 commit 76a3bfc
Show file tree
Hide file tree
Showing 37 changed files with 201 additions and 437 deletions.
465 changes: 116 additions & 349 deletions .cspell.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: "Check spelling"
on: # rebuild any PRs and main branch changes
on:
push:
pull_request:
branches-ignore:
- "dependabot/**"
pull_request:

permissions:
contents: read
Expand All @@ -16,6 +16,7 @@ jobs:
- uses: streetsidesoftware/cspell-action@v4
with:
check_dot_files: false
files: content/**/*.md
incremental_files_only: true
inline: warning
strict: false
12 changes: 6 additions & 6 deletions content/en/content-management/formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ The current list of content formats in Hugo:

| Name | Markup identifiers | Comment |
| ------------- | ------------- |-------------|
| Goldmark | markdown, goldmark |Note that you can set the default handler of `md` and `markdown` to something else, see [Configure Markup](/getting-started/configuration-markup/).|
|Emacs Org-Mode|org|See [go-org](https://github.com/niklasfasching/go-org).|
|AsciiDoc|asciidocext, adoc, ad|Needs [Asciidoctor][ascii] installed.|
|RST|rst|Needs [RST](https://docutils.sourceforge.io/rst.html) installed.|
|Pandoc|pandoc, pdc|Needs [Pandoc](https://www.pandoc.org/) installed.|
|HTML|html, htm|To be treated as a content file, with layout, shortcodes etc., it must have front matter. If not, it will be copied as-is.|
| Goldmark | `markdown`, `goldmark` |Note that you can set the default handler of `md` and `markdown` to something else, see [Configure Markup](/getting-started/configuration-markup/).|
|Emacs Org-Mode|`org`|See [go-org](https://github.com/niklasfasching/go-org).|
|AsciiDoc|`asciidocext`, `adoc`, `ad`|Needs [Asciidoctor][ascii] installed.|
|RST|`rst`|Needs [RST](https://docutils.sourceforge.io/rst.html) installed.|
|Pandoc|`pandoc`, `pdc`|Needs [Pandoc](https://www.pandoc.org/) installed.|
|HTML|`html`, `htm`|To be treated as a content file, with layout, shortcodes etc., it must have front matter. If not, it will be copied as-is.|

The `markup identifier` is fetched from either the `markup` variable in front matter or from the file extension. For markup-related configuration, see [Configure Markup](/getting-started/configuration-markup/).

Expand Down
2 changes: 1 addition & 1 deletion content/en/content-management/image-processing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Example 4: Skips rendering if there's problem accessing a remote resource.
The `image` resource implements the [`Process`], [`Resize`], [`Fit`], [`Fill`], [`Crop`], [`Filter`], [`Colors`] and [`Exif`] methods.

{{% note %}}
Metadata (EXIF, IPTC, XMP, etc.) is not preserved during image transformation. Use the [`Exif`] method with the _original_ image to extract EXIF metadata from JPEG or TIFF images.
Metadata (EXIF, IPTC, XMP, etc.) is not preserved during image transformation. Use the `Exif` method with the _original_ image to extract EXIF metadata from JPEG or TIFF images.
{{% /note %}}

### Process
Expand Down
6 changes: 3 additions & 3 deletions content/en/contribute/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ git rebase --interactive @~6
The `6` at the end of the command represents the number of commits that should be modified. An editor should open and present a list of last six commit messages:

```txt
pick 80d02a1 tpl: Add hasPrefix to the template funcs' "smoke test"
pick 80d02a1 tpl: Add hasPrefix to template function smoke test"
pick aaee038 tpl: Sort the smoke tests
pick f0dbf2c tpl: Add the other test case for hasPrefix
pick 911c35b Add "How to contribute to Hugo" tutorial
Expand All @@ -339,7 +339,7 @@ In the case above we should merge the last two commits in the commit of this tut
All operations are written before the commit message. Replace "pick" with an operation. In this case `squash` or `s` for short:

```txt
pick 80d02a1 tpl: Add hasPrefix to the template funcs' "smoke test"
pick 80d02a1 tpl: Add hasPrefix to template function smoke test"
pick aaee038 tpl: Sort the smoke tests
pick f0dbf2c tpl: Add the other test case for hasPrefix
pick 911c35b Add "How to contribute to Hugo" tutorial
Expand All @@ -352,7 +352,7 @@ We also want to rewrite the commits message of the third last commit. We forgot
You should end up with a similar setup:

```txt
pick 80d02a1 tpl: Add hasPrefix to the template funcs' "smoke test"
pick 80d02a1 tpl: Add hasPrefix to template function smoke test"
pick aaee038 tpl: Sort the smoke tests
pick f0dbf2c tpl: Add the other test case for hasPrefix
reword 911c35b Add "How to contribute to Hugo" tutorial
Expand Down
1 change: 0 additions & 1 deletion content/en/functions/collections/KeyVals.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ The resulting data structure is:
To extract the key and values:

```go-html-template
{{ $kv.Key }} → foo
{{ $kv.Values }} → [a b c]
```
2 changes: 0 additions & 2 deletions content/en/functions/data/GetCSV.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ my-project/

Consider using the [`Resources.Get`] method with [`transform.Unmarshal`] when accessing a page resource.



```text
my-project/
└── content/
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/hugo/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ menu:
parent: functions
---

Use these functions to access information about the Hugo application and the current environment.
Use these functions to access information about the Hugo application and the current environment.
4 changes: 1 addition & 3 deletions content/en/functions/images/Overlay.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: images.Overlay
description: Returns an image filter that overlays the source image at the given coordinates.
description: Returns an image filter that overlays the source image at the given coordinates, relative to the upper left corner.
categories: []
keywords: []
action:
Expand All @@ -13,8 +13,6 @@ action:
toc: true
---

The coordinates are relative to the upper left corner.

## Usage

Capture the overlay image as a resource:
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/js/Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ targetPath
: (`string`) If not set, the source path will be used as the base target path.
Note that the target path's extension may change if the target MIME type is different, e.g. when the source is TypeScript.

params [map or slice]
params
: (`map` or `slice`) Params that can be imported as JSON in your JS files, e.g.

```go-html-template
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/strings/Split.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: strings.Split
description: Returns a slice of strings by splitting STRING by DELIM.
description: Returns a slice of strings by splitting the given string by a delimiter.
categories: []
keywords: []
action:
Expand Down
2 changes: 1 addition & 1 deletion content/en/hosting-and-deployment/hosting-on-firebase.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Host on Firebase
description: You can use Firebase's free tier to host your static website; this also gives you access to Firebase's NOSQL API.
description: You can use Firebase's free tier to host your static website; this also gives you access to Firebase's NoSQL API.
categories: [hosting and deployment]
keywords: [hosting,firebase]
menu:
Expand Down
2 changes: 1 addition & 1 deletion content/en/hosting-and-deployment/hosting-on-netlify.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ toc: true

## Create a Netlify account

Go to [app.netlify.com] and select your preferred signup method. This will likely be a hosted Git provider, although you also have the option to sign up with an email address.
Go to [app.netlify.com] and select your preferred sign up method. This will likely be a hosted Git provider, although you also have the option to sign up with an email address.

The following examples use GitHub, but other git providers will follow a similar process.

Expand Down
26 changes: 13 additions & 13 deletions content/en/hugo-pipes/babel.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ menu:
parent: hugo-pipes
weight: 70
weight: 70
action:
function:
aliases: [babel]
returnType: resource.Resource
signatures: ['resources.Babel [OPTIONS] RESOURCE']
Expand Down Expand Up @@ -44,23 +44,23 @@ module.exports = {

### Options

config [string]
: Path to the Babel configuration file. Hugo will, by default, look for a `babel.config.js` in your project. More information on these configuration files can be found here: [babel configuration](https://babeljs.io/docs/en/configuration).
config
: (`string`) Path to the Babel configuration file. Hugo will, by default, look for a `babel.config.js` in your project. More information on these configuration files can be found here: [babel configuration](https://babeljs.io/docs/en/configuration).

minified [bool]
: Save as many bytes as possible when printing
minified
: (`bool`) Save as many bytes as possible when printing

noComments [bool]
: Write comments to generated output (true by default)
noComments
: (`bool`) Write comments to generated output (true by default)

compact [bool]
: Do not include superfluous whitespace characters and line terminators. Defaults to `auto` if not set.
compact
: (`bool`) Do not include superfluous whitespace characters and line terminators. Defaults to `auto` if not set.

verbose [bool]
: Log everything
verbose
: (`bool`) Log everything

sourceMap [string]
: Output `inline` or `external` sourcemap from the babel compile. External sourcemaps will be written to the target with the output file name + ".map". Input sourcemaps can be read from js.Build and node modules and combined into the output sourcemaps.
sourceMap
: (`string`) Output `inline` or `external` sourcemap from the babel compile. External sourcemaps will be written to the target with the output file name + ".map". Input sourcemaps can be read from js.Build and node modules and combined into the output sourcemaps.

### Examples

Expand Down
42 changes: 21 additions & 21 deletions content/en/hugo-pipes/js.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: js.Build
linkTitle: JavaScript building
description: Process a JavaScript file with [ESBuild](https://github.com/evanw/esbuild).
description: Bundle, transpile, tree shake, and minify JavaScript resources.
categories: [asset management]
keywords: []
menu:
Expand All @@ -21,12 +21,12 @@ Any JavaScript resource file can be transpiled and "tree shaken" using `js.Build

### Options

targetPath [string]
: If not set, the source path will be used as the base target path.
targetPath
: (`string`) If not set, the source path will be used as the base target path.
Note that the target path's extension may change if the target MIME type is different, e.g. when the source is TypeScript.

params [map or slice]
: Params that can be imported as JSON in your JS files, e.g.:
params
: (`map` or `slice`) Params that can be imported as JSON in your JS files, e.g.:

```go-html-template
{{ $js := resources.Get "js/main.js" | js.Build (dict "params" (dict "api" "https://example.org/api")) }}
Expand All @@ -39,14 +39,14 @@ import * as params from '@params';

Note that this is meant for small data sets, e.g. configuration settings. For larger data, please put/mount the files into `/assets` and import them directly.

minify [bool]
: Let `js.Build` handle the minification.
minify
: (`bool`) Let `js.Build` handle the minification.

inject [slice]
: This option allows you to automatically replace a global variable with an import from another file. The path names must be relative to `assets`. See https://esbuild.github.io/api/#inject
inject
: (`slice`) This option allows you to automatically replace a global variable with an import from another file. The path names must be relative to `assets`. See https://esbuild.github.io/api/#inject

shims [map]
: This option allows swapping out a component with another. A common use case is to load dependencies like React from a CDN (with _shims_) when in production, but running with the full bundled `node_modules` dependency during development:
shims
: (`map`) This option allows swapping out a component with another. A common use case is to load dependencies like React from a CDN (with _shims_) when in production, but running with the full bundled `node_modules` dependency during development:

```go-html-template
{{ $shims := dict "react" "js/shims/react.js" "react-dom" "js/shims/react-dom.js" }}
Expand All @@ -72,28 +72,28 @@ import * as React from 'react'
import * as ReactDOM from 'react-dom';
```

target [string]
: The language target.
target
: (`string`) The language target.
One of: `es5`, `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020` or `esnext`.
Default is `esnext`.

externals [slice]
: External dependencies. Use this to trim dependencies you know will never be executed. See https://esbuild.github.io/api/#external
externals
: (`slice`) External dependencies. Use this to trim dependencies you know will never be executed. See https://esbuild.github.io/api/#external

defines [map]
: Allow to define a set of string replacement to be performed when building. Should be a map where each key is to be replaced by its value.
defines
: (`map`) Allow to define a set of string replacement to be performed when building. Should be a map where each key is to be replaced by its value.

```go-html-template
{{ $defines := dict "process.env.NODE_ENV" `"development"` }}
```

format [string]
: The output format.
format
: (`string`) The output format.
One of: `iife`, `cjs`, `esm`.
Default is `iife`, a self-executing function, suitable for inclusion as a <script> tag.

sourceMap [string]
: Whether to generate `inline` or `external` source maps from esbuild. External source maps will be written to the target with the output file name + ".map". Input source maps can be read from js.Build and node modules and combined into the output source maps. By default, source maps are not created.
sourceMap
: (`string`) Whether to generate `inline` or `external` source maps from esbuild. External source maps will be written to the target with the output file name + ".map". Input source maps can be read from js.Build and node modules and combined into the output source maps. By default, source maps are not created.

### Import JS code from /assets

Expand Down
2 changes: 1 addition & 1 deletion content/en/installation/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Most Linux distributions maintain a repository for commonly installed applicatio
{{% note %}}
Due to Long Term Release (LTR) guidelines, most Linux package repositories will not contain the [latest release].

[latest release]: https://github.com/gohugoio/hugo/releases/latest
[latest release]: https://github.com/gohugoio/hugo/releases/latest
{{% /note %}}

### Arch Linux
Expand Down
2 changes: 1 addition & 1 deletion content/en/methods/menu-entry/Page.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If the entry is not associated with a page, we use its `url` and `name` properti
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ else }}
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
{{ end }}
{{ end }}
{{ end }}
</ul>
```
Expand Down
2 changes: 1 addition & 1 deletion content/en/methods/page/AlternativeOutputFormats.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Generate a `link` element in the `<head>` of each page for each of the alternati
{{ $title := printf "%s | %s" .Title site.Title }}
{{ if .IsHome }}
{{ $title = site.Title }}
{{ end }}
{{ end }}
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink $title | safeHTML }}
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions content/en/methods/page/Ancestors.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ With this content structure:
```text
content/
├── auctions/
│ ├── 2023-11/ <-- front matter: weight = 202311
│ │ ├── _index.md
│ ├── 2023-11/
│ │ ├── _index.md <-- front matter: weight = 202311
│ │ ├── auction-1.md
│ │ └── auction-2.md
│ ├── 2023-12/
Expand Down
4 changes: 2 additions & 2 deletions content/en/methods/page/Sections.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ With this content structure:
```text
content/
├── auctions/
│ ├── 2023-11/ <-- front matter: weight = 202311
│ │ ├── _index.md
│ ├── 2023-11/
│ │ ├── _index.md <-- front matter: weight = 202311
│ │ ├── auction-1.md
│ │ └── auction-2.md
│ ├── 2023-12/
Expand Down
2 changes: 1 addition & 1 deletion content/en/methods/pages/Related.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The argument passed to the `Related` method may be a `Page` or an options map. F
To pass an options map:

{{< code file="layouts/_default/single.html" lang=go-html-template copy=false >}}
{{ $opts := dict
{{ $opts := dict
"document" .
"indices" (slice "tags" "keywords")
}}
Expand Down
4 changes: 2 additions & 2 deletions content/en/methods/resource/Exif.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Exif
description: Applicable to images, returns an EXIF object containing image metatdata.
description: Applicable to images, returns an EXIF object containing image metadata.
categories: []
keywords: []
action:
Expand All @@ -10,7 +10,7 @@ action:
toc: true
---

Applicable to images, the `Exif` method on an image `Resource` object returns an [EXIF] object containing image metatdata.
Applicable to images, the `Exif` method on an image `Resource` object returns an [EXIF] object containing image metadata.

## Methods

Expand Down
2 changes: 1 addition & 1 deletion content/en/methods/resource/Key.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ And this template:
{{ with resources.Copy "foo/bar/b.jpg" . }}
{{ .Key }} → foo/bar/b.jpg
{{ .Name }} → images/a.jpg
{{ .Name }} → images/a.jpg
{{ .Title }} → images/a.jpg
{{ .RelPermalink }} → /docs/foo/bar/b.jpg
Expand Down
2 changes: 1 addition & 1 deletion content/en/methods/shortcode/Ordinal.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This shortcode performs error checking, then renders an HTML `img` element with
{{ $src = . }}
{{ with resources.Get $src }}
{{ $id := printf "img-%03d" $.Ordinal }}
<img id="{{ $id }}" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
<img id="{{ $id }}" src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
{{ else }}
{{ errorf "The %q shortcode was unable to find %s. See %s" $.Name $src $.Position }}
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions content/en/methods/shortcode/Scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ action:
signatures: [SHORTCODE.Scratch]
---

The `Scratch` method within a shortcode creates a [scratch pad] to store and manipulate data. The scratch pad is scoped to the shortcode, and is reset on server rebuilds.
The `Scratch` method within a shortcode creates a [scratch pad] to store and manipulate data. The scratch pad is scoped to the shortcode, and is reset on server rebuilds.

{{% note %}}
With the introduction of the [`newScratch`] function, and the ability to [assign values to template variables] after initialization, the `Scratch` method within a shortcode is obsolete.

[assign values to variables]: https://go.dev/doc/go1.11#text/template
[assign values to template variables]: https://go.dev/doc/go1.11#text/template
[`newScratch`]: functions/collections/newscratch
{{% /note %}}

Expand Down
4 changes: 2 additions & 2 deletions content/en/quick-reference/emojis.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ keywords: [emoji]
menu:
docs:
parent: quick-reference
weight: 20
weight: 20
weight: 40
weight: 40
toc: true
---

Expand Down
Loading

0 comments on commit 76a3bfc

Please sign in to comment.