Skip to content

Commit

Permalink
Link destination cleanup (#2028)
Browse files Browse the repository at this point in the history
- Fix broken links (including fragments)
- Remove ref and relref shortcodes
  • Loading branch information
jmooring authored Mar 26, 2023
1 parent fc0ecc0 commit 77f4d6c
Show file tree
Hide file tree
Showing 40 changed files with 126 additions and 140 deletions.
6 changes: 3 additions & 3 deletions content/en/content-management/build-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ If true, the page will be treated as part of the project's collections and, when

#### publishResources

If set to true the [Bundle's Resources]({{< relref "content-management/page-bundles" >}}) will be published.
If set to true the [Bundle's Resources](/content-management/page-bundles) will be published.
Setting this to false will still publish Resources on demand (when a resource's `.Permalink` or `.RelPermalink` is invoked from the templates) but will skip the others.

{{% note %}}
Any page, regardless of their build options, will always be available using the [`.GetPage`]({{< relref "functions/GetPage" >}}) methods.
Any page, regardless of their build options, will always be available using the [`.GetPage`](/functions/GetPage) methods.
{{% /note %}}

------
Expand Down Expand Up @@ -92,7 +92,7 @@ _build:

Website needs to showcase a few of the hundred "testimonials" available as content files without publishing any of them.

To avoid setting the build options on every testimonials, one can use [`cascade`]({{< relref "/content-management/front-matter#front-matter-cascade" >}}) on the testimonial section's content file.
To avoid setting the build options on every testimonials, one can use [`cascade`](/content-management/front-matter#front-matter-cascade) on the testimonial section's content file.

{{< code-toggle >}}
title: Testimonials
Expand Down
14 changes: 7 additions & 7 deletions content/en/content-management/image-processing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,15 +457,15 @@ If you change image processing methods or options, or if you rename or remove im
hugo --gc
```

[`anchor`]: {{< relref "content-management/image-processing#anchor" >}}
[`lang.FormatNumber`]: {{< relref "functions/lang#langformatnumber" >}}
[Exif]: <https://en.wikipedia.org/wiki/Exif>
[filters]: {{< relref "functions/images" >}}
[time.Format]: /functions/dateformat
[`anchor`]: /content-management/image-processing#anchor
[mounted]: /hugo-modules/configuration#module-config-mounts
[page bundle]: /content-management/page-bundles
[`lang.FormatNumber`]: /functions/lang
[filters]: /functions/images
[github.com/disintegration/imaging]: <https://github.com/disintegration/imaging#image-resizing>
[mounted]: {{< relref "hugo-modules/configuration#module-config-mounts">}}
[page bundle]: {{< relref "content-management/page-bundles" >}}
[Smartcrop]: <https://github.com/muesli/smartcrop#smartcrop>
[time.Format]: {{< relref "functions/dateformat" >}}
[Exif]: <https://en.wikipedia.org/wiki/Exif>
[`Colors`]: #colors
[`Crop`]: #crop
[`Exif`]: #exif
Expand Down
10 changes: 5 additions & 5 deletions content/en/content-management/multilingual.md
Original file line number Diff line number Diff line change
Expand Up @@ -607,11 +607,11 @@ hugo new content/de/post/test.md
[homepage]: /templates/homepage/
[Hugo Multilingual Part 1: Content translation]: https://regisphilibert.com/blog/2018/08/hugo-multilingual-part-1-managing-content-translation/
[i18func]: /functions/i18n/
[lang.FormatAccounting]: /functions/lang/#langformataccounting
[lang.FormatCurrency]: /functions/lang/#langformatcurrency
[lang.FormatNumber]: /functions/lang/#langformatnumber
[lang.FormatNumberCustom]: /functions/lang/#langformatnumbercustom
[lang.FormatPercent]: /functions/lang/#langformatpercent
[lang.FormatAccounting]: /functions/lang
[lang.FormatCurrency]: /functions/lang
[lang.FormatNumber]: /functions/lang
[lang.FormatNumberCustom]: /functions/lang
[lang.FormatPercent]: /functions/lang
[lang.Merge]: /functions/lang.merge/
[menus]: /content-management/menus/
[OS environment]: /getting-started/configuration/#configure-with-environment-variables
Expand Down
2 changes: 1 addition & 1 deletion content/en/content-management/organization/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ aliases: [/content/sections/]

Hugo `0.32` announced page-relative images and other resources packaged into `Page Bundles`.

These terms are connected, and you also need to read about [Page Resources]({{< relref "/content-management/page-resources" >}}) and [Image Processing]({{< relref "/content-management/image-processing" >}}) to get the full picture.
These terms are connected, and you also need to read about [Page Resources](/content-management/page-resources) and [Image Processing](/content-management/image-processing) to get the full picture.

{{< imgproc 1-featured Resize "300x" >}}
The illustration shows three bundles. Note that the home page bundle cannot contain other content pages, although other files (images etc.) are allowed.
Expand Down
3 changes: 1 addition & 2 deletions content/en/content-management/page-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ menu:
toc: true
weight: 80
---
Page resources are only accessible from [page bundles]({{< relref
"/content-management/page-bundles" >}}), those directories with `index.md` or
Page resources are only accessible from [page bundles](/content-management/page-bundles), those directories with `index.md` or
`_index.md` files at their root. Page resources are only available to the
page with which they are bundled.

Expand Down
4 changes: 2 additions & 2 deletions content/en/content-management/taxonomies.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ When taxonomies are used---and [taxonomy templates] are provided---Hugo will aut

## Configure Taxonomies

Custom taxonomies other than the [defaults]({{< relref "taxonomies.md#default-taxonomies" >}}) must be defined in your [site config][config] before they can be used throughout the site. You need to provide both the plural and singular labels for each taxonomy. For example, `singular key = "plural value"` for TOML and `singular key: "plural value"` for YAML.
Custom taxonomies other than the [defaults](#default-taxonomies) must be defined in your [site config][config] before they can be used throughout the site. You need to provide both the plural and singular labels for each taxonomy. For example, `singular key = "plural value"` for TOML and `singular key: "plural value"` for YAML.

### Example: Adding a custom taxonomy named "series"

Expand All @@ -130,7 +130,7 @@ If you want to have just the default `tags` taxonomy, and remove the `categories
tag = "tags"
{{</ code-toggle >}}

If you want to disable all taxonomies altogether, see the use of `disableKinds` in [Hugo Taxonomy Defaults]({{< relref "taxonomies.md#default-taxonomies" >}}).
If you want to disable all taxonomies altogether, see the use of `disableKinds` in [Hugo Taxonomy Defaults](#default-taxonomies).

{{% note %}}
You can add content and front matter to your taxonomy list and taxonomy terms pages. See [Content Organization](/content-management/organization/) for more information on how to add an `_index.md` for this purpose.
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/fileExists.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ relatedfuncs: ['os.ReadDir','os.ReadFile','os.Stat']
deprecated: false
aliases: []
---
The `os.FileExists` function attempts to resolve the path relative to the root of your project directory. If a matching file or directory is not found, it will attempt to resolve the path relative to the [`contentDir`]({{< relref "getting-started/configuration#contentdir">}}). A leading path separator (`/`) is optional.
The `os.FileExists` function attempts to resolve the path relative to the root of your project directory. If a matching file or directory is not found, it will attempt to resolve the path relative to the [`contentDir`](/getting-started/configuration#contentdir). A leading path separator (`/`) is optional.

With this directory structure:

Expand Down
8 changes: 4 additions & 4 deletions content/en/functions/highlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ Instead of specifying both `lineNos` and `lineNumbersInTable`, you can use the f
```

[Chroma]: https://github.com/alecthomas/chroma
[hugo client]: {{< relref "commands/hugo_gen_chromastyles" >}}
[options]: {{< relref "#options" >}}
[site configuration]: {{< relref "getting-started/configuration-markup#highlight">}}
[hugo client]: /commands/hugo_gen_chromastyles
[options]: #options
[site configuration]: /getting-started/configuration-markup#highlight
[style gallery]: https://xyproto.github.io/splash/docs/
[supported languages]: {{< relref "content-management/syntax-highlighting#list-of-chroma-highlighting-languages" >}}
[supported languages]: /content-management/syntax-highlighting#list-of-chroma-highlighting-languages
3 changes: 1 addition & 2 deletions content/en/functions/int.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ leading 0's, then those 0's will have to be removed before passing the string
to the `int` function, else that string will be tried to be parsed as an octal
number representation.

The [`strings.TrimLeft` function](/functions/strings.trimleft/) can be used for
this purpose.
The `strings.TrimLeft` can be used for this purpose.

```
{{ int ("0987" | strings.TrimLeft "0") }}
Expand Down
2 changes: 0 additions & 2 deletions content/en/functions/lang.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ menu:
signature: ["lang.NumFmt PRECISION NUMBER [OPTIONS [DELIMITER]]"]
aliases: ['/functions/numfmt/']
type: 'template-func'

---

2 changes: 1 addition & 1 deletion content/en/functions/merge.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ Example 4
```

{{% note %}}
Regardless of depth, merging only applies to maps. For slices, use [append]({{< ref "functions/append" >}}).
Regardless of depth, merging only applies to maps. For slices, use [append](/functions/append).
{{% /note %}}
2 changes: 1 addition & 1 deletion content/en/functions/os.Stat.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ relatedfuncs: ['os.FileExists','os.ReadDir','os.ReadFile']
deprecated: false
aliases: []
---
The `os.Stat` function attempts to resolve the path relative to the root of your project directory. If a matching file or directory is not found, it will attempt to resolve the path relative to the [`contentDir`]({{< relref "getting-started/configuration#contentdir">}}). A leading path separator (`/`) is optional.
The `os.Stat` function attempts to resolve the path relative to the root of your project directory. If a matching file or directory is not found, it will attempt to resolve the path relative to the [`contentDir`](/getting-started/configuration#contentdir). A leading path separator (`/`) is optional.

```go-html-template
{{ $f := os.Stat "README.md" }}
Expand Down
2 changes: 1 addition & 1 deletion content/en/functions/readdir.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ Note that `os.ReadDir` is not recursive.

Details of the `FileInfo` structure are available in the [Go documentation](https://pkg.go.dev/io/fs#FileInfo).

For more information on using `readDir` and `readFile` in your templates, see [Local File Templates]({{< relref "/templates/files" >}}).
For more information on using `readDir` and `readFile` in your templates, see [Local File Templates](/templates/files).
4 changes: 2 additions & 2 deletions content/en/functions/readfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ relatedfuncs: ['os.FileExists','os.ReadDir','os.Stat']
deprecated: false
aliases: []
---
The `os.ReadFile` function attempts to resolve the path relative to the root of your project directory. If a matching file is not found, it will attempt to resolve the path relative to the [`contentDir`]({{< relref "getting-started/configuration#contentdir">}}). A leading path separator (`/`) is optional.
The `os.ReadFile` function attempts to resolve the path relative to the root of your project directory. If a matching file is not found, it will attempt to resolve the path relative to the [`contentDir`](/getting-started/configuration#contentdir). A leading path separator (`/`) is optional.

With a file named README.md in the root of your project directory:

Expand All @@ -38,4 +38,4 @@ This is **bold** text.

Note that `os.ReadFile` returns raw (uninterpreted) content.

For more information on using `readDir` and `readFile` in your templates, see [Local File Templates]({{< relref "/templates/files" >}}).
For more information on using `readDir` and `readFile` in your templates, see [Local File Templates](/templates/files).
2 changes: 1 addition & 1 deletion content/en/functions/site.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ draft: false
aliases: []
---

`site` is a global function which returns the same data as the `.Site` page method. See: [Site Variables]({{< relref "/variables/site" >}}).
`site` is a global function which returns the same data as the `.Site` page method. See: [Site Variables](/variables/site).
2 changes: 1 addition & 1 deletion content/en/functions/split.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ Examples:


{{% note %}}
`split` essentially does the opposite of [delimit]({{< ref "functions/delimit" >}}). While `split` creates a slice from a string, `delimit` creates a string from a slice.
`split` essentially does the opposite of [delimit](/functions/delimit). While `split` creates a slice from a string, `delimit` creates a string from a slice.
{{% /note %}}
2 changes: 1 addition & 1 deletion content/en/functions/where.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ You can also put the returned value of the `where` clauses into a variable:

Using `first` and `where` together can be very
powerful. Below snippet gets a list of posts only from [**main
sections**]({{< relref "where.md#mainsections" >}}), sorts it using the [default
sections**](#mainsections), sorts it using the [default
ordering](/templates/lists/) for lists (i.e., `weight => date`), and
then ranges through only the first 5 posts in that list:

Expand Down
4 changes: 2 additions & 2 deletions content/en/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ See [Configure Media Types](/templates/output-formats/#media-types).

### menus

See [Add Non-content Entries to a Menu](/content-management/menus/#add-non-content-entries-to-a-menu).
See [Menus](/content-management/menus/#define-in-site-configuration).

### minify

Expand Down Expand Up @@ -419,7 +419,7 @@ Maximum number of items in the RSS feed.

### sectionPagesMenu

See ["Section Menu for Lazy Bloggers"](/templates/menu-templates/#section-menu-for-lazy-bloggers).
See [Menus](/content-management/menus/#define-in-site-configuration).

### security

Expand Down
2 changes: 1 addition & 1 deletion content/en/getting-started/directory-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ From **Hugo 0.31** you can have multiple static directories.
[`layouts`]: /templates/
[`static`]: /content-management/static-files/
[`resources`]: /getting-started/configuration/#configure-file-caches
[lists]: /templates/list/
[lists]: /templates/lists/
[pagevars]: /variables/page/
[partials]: /templates/partials/
[searchconsole]: https://support.google.com/webmasters/answer/9008080#zippy=%2Chtml-file-upload
Expand Down
3 changes: 1 addition & 2 deletions content/en/hosting-and-deployment/hosting-on-netlify.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ See [this blog post](https://www.netlify.com/blog/2017/04/11/netlify-plus-hugo-0

## Use Hugo Themes with Netlify

The [`git clone` method for installing themes][installthemes] is not supported by Netlify. If you were to use `git clone`, it would require you to recursively remove the `.git` subdirectory from the theme folder and would therefore prevent compatibility with future versions of the theme.
The `git clone` method for installing themes is not supported by Netlify. If you were to use `git clone`, it would require you to recursively remove the `.git` subdirectory from the theme folder and would therefore prevent compatibility with future versions of the theme.

A *better* approach is to install a theme as a proper git submodule. You can [read the GitHub documentation for submodules][ghsm] or those found on [Git's website][gitsm] for more information, but the command is similar to that of `git clone`:

Expand Down Expand Up @@ -147,7 +147,6 @@ You now have a live website served over HTTPS, distributed through CDN, and conf
[gitsm]: https://git-scm.com/book/en/v2/Git-Tools-Submodules
[httpscustom]: https://www.netlify.com/docs/ssl/
[hugoversions]: https://github.com/netlify/build-image/blob/master/Dockerfile#L216
[installthemes]: /themes/installing/
[netlify]: https://www.netlify.com/
[netlifysignup]: https://app.netlify.com/signup
[Quick Start]: /getting-started/quick-start/
Expand Down
2 changes: 1 addition & 1 deletion content/en/hugo-pipes/transform-to-css.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ includePaths [string slice]
```

{{% note %}}
Setting `outputStyle` to `compressed` will handle Sass/SCSS files minification better than the more generic [`resources.Minify`]({{< ref "minification">}}).
Setting `outputStyle` to `compressed` will handle Sass/SCSS files minification better than the more generic [`resources.Minify`](/hugo-pipes/minification).
{{% /note %}}
12 changes: 6 additions & 6 deletions content/en/news/0.11-relnotes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ categories: ["Releases"]
- [Live Reload](/getting-started/usage/#livereload). Hugo will automatically reload the browser when the build is complete
- Theme engine w/[Theme Repository](http://github.com/spf13/hugoThemes)
- [Menu system](/content-management/menus/) with support for active page
- [Builders](/extras/builders) to quickly create a new site, content or theme
- [XML sitemap](/templates/sitemap) generation
- [Integrated Disqus](/extras/comments) support
- Streamlined [template organization](/templates/overview)
- [Builders](/commands/hugo_new) to quickly create a new site, content or theme
- [XML sitemap](/templates/sitemap-template) generation
- [Integrated Disqus](/content-management/comments) support
- Streamlined [template organization](/templates/introduction)
- Brand new docs site
- Support for publishDate which allows for posts to be dated in the future
- More [sort](/functions/sort/#readout) options
- More [sort](/functions/sort) options
- Logging support
- Much better error handling
- More informative verbose output
- Renamed Indexes > [Taxonomies](/taxonomies/overview)
- Renamed Indexes > [Taxonomies](/content-management/taxonomies/)
- Renamed Chrome > [Partials](/templates/partials)
10 changes: 5 additions & 5 deletions content/en/news/0.12-relnotes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ This release represents over 90 code commits from 28 different contributors.
- 10 [new themes](https://github.com/spf13/hugoThemes) created by the community
- fully themable [partials](/templates/partials/)
- [404 template](/templates/404/) support in themes
- [shortcode](/extras/shortcodes/) support in themes
- [shortcode](/content-management/shortcodes/) support in themes
- [views](/templates/views/) support in themes
- inner [shortcode](/extras/shortcodes/) content now treated as markdown
- inner [shortcode](/content-management/shortcodes) content now treated as markdown
- support for header ids in markdown (# header {#myid})
- [where](/functions/where/) template function to filter lists of content, taxonomies, etc.
- [groupby](/templates/list) & [groupbydate](/templates/list) methods to group pages
- taxonomy [pages list](/taxonomies/methods/) now sortable, filterable, limitable & groupable
- [groupby](/templates/lists#by-page-field) & [groupbydate](/templates/lists/#by-date-1) methods to group pages
- taxonomy [pages list](/templates/taxonomy-templates#taxonomy-methods) now sortable, filterable, limitable & groupable
- general cleanup to taxonomies & documentation to make it more clear and consistent
- [showcase](/showcase/) returned and has been expanded
- pretty links now always have trailing slashes
- [baseurl](/overview/configuration/) can now include a subdirectory
- [baseurl](/getting-started/configuration#baseurl) can now include a subdirectory
- better feedback about draft & future post rendering
- a variety of improvements to [the website](/)
2 changes: 1 addition & 1 deletion content/en/news/0.14-relnotes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This release represents over **240 contributions by 36 contributors** to the mai
Big shout out to [@bep](https://github.com/bep) who led the development of Hugo this release, [@anthonyfok](https://github.com/anthonyfok), [@eparis](https://github.com/eparis), [@SchumacherFM](https://github.com/SchumacherFM), [@RickCogley](https://github.com/RickCogley) & [@mdhender](https://github.com/mdhender) for their significant contributions and [@tatsushid](https://github.com/tatsushid) for his continuous improvements to the templates. Also a big thanks to all the theme creators. 11 new themes have been added since last release and the [hugoThemes repo now has previews of all of them](https://github.com/spf13/hugoThemes/blob/master/README.md#theme-list).

Hugo also depends on a lot of other great projects. A big thanks to all of our dependencies inclding:
[cobra](https://github.com/spf13/cobra), [viper](https://github.com/spf13/viper), [blackfriday](https://github.com/russross/blackfriday), [pflag](https://github.com/spf13/pflag), [HugoThemes](https://github.com/spf13/hugothemes), [BurntSushi/Toml](github.com/BurntSushi/toml), [goYaml](https://github.com/go-yaml/yaml/tree/v2), and the Go standard library.
[cobra](https://github.com/spf13/cobra), [viper](https://github.com/spf13/viper), [blackfriday](https://github.com/russross/blackfriday), [pflag](https://github.com/spf13/pflag), [HugoThemes](https://github.com/spf13/hugothemes), [BurntSushi/Toml](https://github.com/BurntSushi/toml), [goYaml](https://github.com/go-yaml/yaml/tree/v2), and the Go standard library.

## New features
- Support for all file types in content directory.
Expand Down
Loading

0 comments on commit 77f4d6c

Please sign in to comment.