Skip to content

all: Keep links in sync with new docs site structure #13498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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 CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ organization, tutorials, blog posts, bug reports, issues, feature requests,
feature implementations, pull requests, answering questions on the forum,
helping to manage issues, etc.

The Hugo community and maintainers are [very active](https://github.com/gohugoio/hugo/pulse/monthly) and helpful, and the project benefits greatly from this activity. We created a [step by step guide](https://gohugo.io/tutorials/how-to-contribute-to-hugo/) if you're unfamiliar with GitHub or contributing to open source projects in general.
The Hugo community and maintainers are [very active](https://github.com/gohugoio/hugo/pulse/monthly) and helpful, and the project benefits greatly from this activity. We created a [step by step guide](https://gohugo.io/docs/contribute/development/) if you're unfamiliar with GitHub or contributing to open source projects in general.

*Note that this repository only contains the actual source code of Hugo. For **only** documentation-related pull requests / issues please refer to the [hugoDocs](https://github.com/gohugoio/hugoDocs) repository.*

Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@
[contributing]: CONTRIBUTING.md
[create a proposal]: https://github.com/gohugoio/hugo/issues/new?labels=Proposal%2C+NeedsTriage&template=feature_request.md
[documentation repository]: https://github.com/gohugoio/hugoDocs
[documentation]: https://gohugo.io/documentation
[dragonfly bsd, freebsd, netbsd, and openbsd]: https://gohugo.io/installation/bsd
[documentation]: https://gohugo.io/docs/
[dragonfly bsd, freebsd, netbsd, and openbsd]: https://gohugo.io/docs/installation/bsd/
[features]: https://gohugo.io/about/features/
[forum]: https://discourse.gohugo.io
[friends]: https://github.com/gohugoio/hugo/graphs/contributors
[go]: https://go.dev/
[hugo modules]: https://gohugo.io/hugo-modules/
[installation]: https://gohugo.io/installation
[modules]: https://gohugo.io/docs/concepts/modules/
[installation]: https://gohugo.io/docs/installation/
[issue queue]: https://github.com/gohugoio/hugo/issues
[linux]: https://gohugo.io/installation/linux
[macos]: https://gohugo.io/installation/macos
[linux]: https://gohugo.io/docs/installation/linux/
[macos]: https://gohugo.io/docs/installation/macos/
[prebuilt binary]: https://github.com/gohugoio/hugo/releases/latest
[requesting help]: https://discourse.gohugo.io/t/requesting-help/9132
[spf13]: https://github.com/spf13
[static site generator]: https://en.wikipedia.org/wiki/Static_site_generator
[support]: https://discourse.gohugo.io
[themes]: https://themes.gohugo.io/
[website]: https://gohugo.io
[windows]: https://gohugo.io/installation/windows
[windows]: https://gohugo.io/docs/installation/windows/

<a href="https://gohugo.io/"><img src="https://raw.githubusercontent.com/gohugoio/gohugoioTheme/master/static/images/hugo-logo-wide.svg?sanitize=true" alt="Hugo" width="565"></a>
<a href="https://gohugo.io/"><img src="https://gohugo.io/images/hugo-logo-wide.svg" alt="Hugo" width="565"></a>

A fast and flexible static site generator built with love by [bep], [spf13], and [friends] in [Go].

Expand Down Expand Up @@ -57,7 +57,7 @@ Hugo's fast asset pipelines include:
- Sass processing &ndash; Transpile Sass to CSS, bundle, tree shake, minify, create source maps, perform SRI hashing, and integrate with PostCSS
- Tailwind CSS processing &ndash; Compile Tailwind CSS utility classes into standard CSS, bundle, tree shake, optimize, minify, perform SRI hashing, and integrate with PostCSS

And with [Hugo Modules], you can share content, assets, data, translations, themes, templates, and configuration with other projects via public or private Git repositories.
And with Hugo [modules], you can share content, assets, data, translations, themes, templates, and configuration with other projects via public or private Git repositories.

See the [features] section of the documentation for a comprehensive summary of Hugo's capabilities.

Expand All @@ -80,10 +80,10 @@ Encode to the WebP format when [processing images]. You can decode WebP images w
[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:
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]: https://gohugo.io/functions/css/sass/#dart-sass
[processing images]: https://gohugo.io/content-management/image-processing/
[transpile sass to css]: https://gohugo.io/functions/css/sass/
[details]: https://gohugo.io/hosting-and-deployment/hugo-deploy/
[dart sass]: https://gohugo.io/docs/reference/functions/css/sass/#dart-sass
[processing images]: https://gohugo.io/docs/guides/asset-pipelines/imaging/
[transpile sass to css]: https://gohugo.io/docs/reference/functions/css/sass
[details]: https://gohugo.io/docs/guides/host-and-deploy/deploy-with-hugo-deploy/

Unless your specific deployment needs require the extended/deploy edition, we recommend the extended edition.

Expand Down
2 changes: 1 addition & 1 deletion commands/commandeer.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ func (r *rootCommand) initRootCommand(subCommandName string, cd *simplecobra.Com
Hugo is a Fast and Flexible Static Site Generator
built with love by spf13 and friends in Go.

Complete documentation is available at https://gohugo.io/.`
Complete documentation is available at https://gohugo.io/docs/.`

cmd.Long = strings.ReplaceAll(cmd.Long, "COMMAND_NAME", commandName)

Expand Down
3 changes: 1 addition & 2 deletions commands/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ func newDeployCommand() simplecobra.Commander {
short: "Deploy your site to a cloud provider",
long: `Deploy your site to a cloud provider

See https://gohugo.io/hosting-and-deployment/hugo-deploy/ for detailed
documentation.
See https://gohugo.io/docs/guides/host-and-deploy/deploy-with-hugo-deploy/ for detailed documentation.
`,
run: func(ctx context.Context, cd *simplecobra.Commandeer, r *rootCommand, args []string) error {
h, err := r.Hugo(flagsToCfgWithAdditionalConfigBase(cd, nil, "deployment"))
Expand Down
2 changes: 1 addition & 1 deletion commands/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ url: %s
short: "Generate Markdown documentation for the Hugo CLI",
long: `Generate Markdown documentation for the Hugo CLI.
This command is, mostly, used to create up-to-date documentation
of Hugo's command-line interface for https://gohugo.io/.
of Hugo's command-line interface for https://gohugo.io/docs/.

It creates one Markdown file per command with front matter suitable
for rendering in Hugo.`,
Expand Down
14 changes: 7 additions & 7 deletions commands/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Note that Hugo will always start out by resolving the components defined in the
configuration, provided by a _vendor directory (if no --ignoreVendorPaths flag provided),
Go Modules, or a folder inside the themes directory, in that order.

See https://gohugo.io/hugo-modules/ for more information.
See https://gohugo.io/docs/concepts/modules/ for more information.

`

Expand Down Expand Up @@ -82,12 +82,12 @@ so this may/will change in future versions of Hugo.
name: "init",
short: "Initialize this project as a Hugo Module",
long: `Initialize this project as a Hugo Module.
It will try to guess the module path, but you may help by passing it as an argument, e.g:
It will try to guess the module path, but you may help by passing it as an argument, e.g.:

hugo mod init github.com/gohugoio/testshortcodes
hugo mod init github.com/gohugoio/testshortcodes

Note that Hugo Modules supports multi-module projects, so you can initialize a Hugo Module
inside a subfolder on GitHub, as one example.
Note that Hugo Modules supports multi-module projects, so you can initialize a Hugo Module
inside a subfolder on GitHub, as one example.
`,
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
Expand Down Expand Up @@ -154,7 +154,7 @@ Note that for vendored modules, that is the version listed and not the one from
withc: func(cmd *cobra.Command, r *rootCommand) {
cmd.ValidArgsFunction = cobra.NoFileCompletions
applyLocalFlagsBuildConfig(cmd, r)
cmd.Flags().StringVarP(&pattern, "pattern", "", "", `pattern matching module paths to clean (all if not set), e.g. "**hugo*"`)
cmd.Flags().StringVarP(&pattern, "pattern", "", "", `pattern matching module paths to clean (all if not set), e.g., "**hugo*"`)
_ = cmd.RegisterFlagCompletionFunc("pattern", cobra.NoFileCompletions)
cmd.Flags().BoolVarP(&all, "all", "", false, "clean entire module cache")
},
Expand Down Expand Up @@ -330,7 +330,7 @@ func (c *modCommands) Init(cd *simplecobra.Commandeer) error {
cmd := cd.CobraCommand
cmd.Short = "Manage modules"
cmd.Long = `Various helpers to help manage the modules in your project's dependency graph.
Most operations here requires a Go version installed on your system (>= Go 1.12) and the relevant VCS client (typically Git).
Most operations here require a Go version installed on your system (>= Go 1.18) and the relevant VCS client (typically Git).
This is not needed if you only operate on modules inside /themes or if you have vendored them via "hugo mod vendor".

` + commonUsageMod
Expand Down
2 changes: 1 addition & 1 deletion commands/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (c *newCommand) newSiteNextStepsText(path string, format string) string {
nextStepsText.WriteString(`".
5. Start the embedded web server with the command "hugo server --buildDrafts".

See documentation at https://gohugo.io/.`)
See documentation at https://gohugo.io/docs/.`)

return nextStepsText.String()
}
2 changes: 1 addition & 1 deletion common/herrors/error_locator.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ type ErrorContext struct {
Position text.Position

// The lexer to use for syntax highlighting.
// https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages
// https://gohugo.io/docs/concepts/syntax-highlighting/#languages
ChromaLexer string
}

Expand Down
4 changes: 2 additions & 2 deletions hugolib/cascade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ defaultContentLanguageInSubDir = false
createContentFiles("en")

b.WithTemplates("index.html", `

{{ range .Site.Pages }}
{{- .Weight }}|{{ .Kind }}|{{ .Path }}|{{ .Title }}|{{ .Params.icon }}|{{ .Type }}|{{ range .OutputFormats }}{{ .Name }}-{{ end }}|
{{ end }}
Expand Down Expand Up @@ -749,7 +749,7 @@ title: "Post 1"
`
b, err := TestE(t, files)
b.Assert(err, qt.IsNotNil)
b.AssertLogContains(`cascade target path "/posts/post-1.de.md" looks like a path with an extension; since Hugo v0.123.0 this will not match anything, see https://gohugo.io/methods/page/path/`)
b.AssertLogContains(`cascade target path "/posts/post-1.de.md" looks like a path with an extension; since Hugo v0.123.0 this will not match anything, see https://gohugo.io/docs/reference/methods/page/path/`)
}

func TestCascadeExtensionInPathIgnore(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions hugolib/hugo_sites_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ func (h *HugoSites) render(l logg.LevelLogger, config *BuildCfg) error {
// with the more general try.
if strings.Contains(err.Error(), "can't evaluate field Err in type") {
if strings.Contains(err.Error(), "resource.Resource") {
return fmt.Errorf("%s: Resource.Err was removed in Hugo v0.141.0 and replaced with a new try keyword, see https://gohugo.io/functions/go-template/try/", err)
return fmt.Errorf("%s: Resource.Err was removed in Hugo v0.141.0 and replaced with a new try keyword, see https://gohugo.io/docs/reference/functions/go-template/try/", err)
} else if strings.Contains(err.Error(), "template.HTML") {
return fmt.Errorf("%s: the return type of transform.ToMath was changed in Hugo v0.141.0 and the error handling replaced with a new try keyword, see https://gohugo.io/functions/go-template/try/", err)
return fmt.Errorf("%s: the return type of transform.ToMath was changed in Hugo v0.141.0 and the error handling replaced with a new try keyword, see https://gohugo.io/docs/reference/functions/go-template/try/", err)
}
}
return err
Expand Down
2 changes: 1 addition & 1 deletion hugolib/page__meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ func (p *pageState) setMetaPostParams() error {
var buildConfig any
var isNewBuildKeyword bool
if v, ok := pm.pageConfig.Params["_build"]; ok {
hugo.Deprecate("The \"_build\" front matter key", "Use \"build\" instead. See https://gohugo.io/content-management/build-options.", "0.145.0")
hugo.Deprecate("The \"_build\" front matter key", "Use \"build\" instead. See https://gohugo.io/docs/guides/build-options/.", "0.145.0")
buildConfig = v
} else {
buildConfig = pm.pageConfig.Params["build"]
Expand Down
2 changes: 1 addition & 1 deletion hugolib/rendershortcodes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ Hello <b>world</b>. Some **bold** text. Some Unicode: 神真美好.
b := TestRunning(t, files, TestOptWarn())

b.AssertNoRenderShortcodesArtifacts()
b.AssertLogContains(filepath.ToSlash("WARN .RenderShortcodes detected inside HTML block in \"/content/p1.md\"; this may not be what you intended, see https://gohugo.io/methods/page/rendershortcodes/#limitations\nYou can suppress this warning by adding the following to your site configuration:\nignoreLogs = ['warning-rendershortcodes-in-html']"))
b.AssertLogContains(filepath.ToSlash("WARN .RenderShortcodes detected inside HTML block in \"/content/p1.md\"; this may not be what you intended, see https://gohugo.io/docs/reference/methods/page/rendershortcodes/#limitations\nYou can suppress this warning by adding the following to your site configuration:\nignoreLogs = ['warning-rendershortcodes-in-html']"))
b.AssertFileContent("public/p1/index.html", "<div>Hello <b>world</b>. Some **bold** text. Some Unicode: 神真美好.\n</div>")
b.EditFileReplaceAll("content/p2.md", "Hello", "Hello Edited").Build()
b.AssertNoRenderShortcodesArtifacts()
Expand Down
12 changes: 6 additions & 6 deletions markup/goldmark/goldmark_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ title: "p1"
b := hugolib.Test(t, files, hugolib.TestOptWarn())

b.AssertFileContent("public/p1/index.html", "<!-- raw HTML omitted -->")
b.AssertLogContains("WARN Raw HTML omitted while rendering \"/content/p1.md\"; see https://gohugo.io/getting-started/configuration-markup/#rendererunsafe\nYou can suppress this warning by adding the following to your site configuration:\nignoreLogs = ['warning-goldmark-raw-html']")
b.AssertLogContains("WARN Raw HTML omitted while rendering \"/content/p1.md\"; see https://gohugo.io/docs/reference/configuration/markup/#rendererunsafe\nYou can suppress this warning by adding the following to your site configuration:\nignoreLogs = ['warning-goldmark-raw-html']")

b = hugolib.Test(t, strings.ReplaceAll(files, "markup.goldmark.renderer.unsafe = false", "markup.goldmark.renderer.unsafe = true"), hugolib.TestOptWarn())
b.AssertFileContent("public/p1/index.html", "! <!-- raw HTML omitted -->")
Expand All @@ -878,7 +878,7 @@ title: "p1"
b := hugolib.Test(t, files, hugolib.TestOptWarn())

b.AssertFileContent("public/p1/index.html", "<!-- raw HTML omitted -->")
b.AssertLogContains("WARN Raw HTML omitted while rendering \"/content/p1.md\"; see https://gohugo.io/getting-started/configuration-markup/#rendererunsafe\nYou can suppress this warning by adding the following to your site configuration:\nignoreLogs = ['warning-goldmark-raw-html']")
b.AssertLogContains("WARN Raw HTML omitted while rendering \"/content/p1.md\"; see https://gohugo.io/docs/reference/configuration/markup/#rendererunsafe\nYou can suppress this warning by adding the following to your site configuration:\nignoreLogs = ['warning-goldmark-raw-html']")

b = hugolib.Test(t, strings.ReplaceAll(files, "markup.goldmark.renderer.unsafe = false", "markup.goldmark.renderer.unsafe = true"), hugolib.TestOptWarn())
b.AssertFileContent("public/p1/index.html", "! <!-- raw HTML omitted -->")
Expand All @@ -897,7 +897,7 @@ title: "p1"
---
# HTML comments

## Simple
## Simple
<!-- This is a comment -->

<!-- This is a comment indented -->
Expand All @@ -918,7 +918,7 @@ title: "p1"
<img border="0" src="pic_trulli.jpg" alt="Trulli">
-->

## XSS
## XSS

<!-- --><script>alert("I just escaped the HTML comment")</script><!-- -->

Expand All @@ -931,10 +931,10 @@ This is a <!-- hidden--> word.

This is a <!-- hidden --> word.

This is a <!--
This is a <!--
hidden --> word.

This is a <!--
This is a <!--
hidden
--> word.

Expand Down
4 changes: 2 additions & 2 deletions markup/goldmark/hugocontext/hugocontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (r *hugoContextRenderer) stripHugoCtx(b []byte) ([]byte, bool) {
}

func (r *hugoContextRenderer) logRawHTMLEmittedWarn(w util.BufWriter) {
r.logger.Warnidf(constants.WarnGoldmarkRawHTML, "Raw HTML omitted while rendering %q; see https://gohugo.io/getting-started/configuration-markup/#rendererunsafe", r.getPage(w))
r.logger.Warnidf(constants.WarnGoldmarkRawHTML, "Raw HTML omitted while rendering %q; see https://gohugo.io/docs/reference/configuration/markup/#rendererunsafe", r.getPage(w))
}

func (r *hugoContextRenderer) getPage(w util.BufWriter) any {
Expand Down Expand Up @@ -188,7 +188,7 @@ func (r *hugoContextRenderer) renderHTMLBlock(
var stripped bool
linev, stripped = r.stripHugoCtx(linev)
if stripped {
r.logger.Warnidf(constants.WarnRenderShortcodesInHTML, ".RenderShortcodes detected inside HTML block in %q; this may not be what you intended, see https://gohugo.io/methods/page/rendershortcodes/#limitations", r.getPage(w))
r.logger.Warnidf(constants.WarnRenderShortcodesInHTML, ".RenderShortcodes detected inside HTML block in %q; this may not be what you intended, see https://gohugo.io/docs/reference/methods/page/rendershortcodes/#limitations", r.getPage(w))
}
r.Writer.SecureWrite(w, linev)
}
Expand Down
4 changes: 2 additions & 2 deletions resources/page/page_matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package page
import (
"fmt"
"path/filepath"
"slices"
"strings"

"github.com/gohugoio/hugo/common/loggers"
Expand All @@ -24,7 +25,6 @@ import (
"github.com/gohugoio/hugo/hugofs/glob"
"github.com/gohugoio/hugo/resources/kinds"
"github.com/mitchellh/mapstructure"
"slices"
)

// A PageMatcher can be used to match a Page with Glob patterns.
Expand Down Expand Up @@ -101,7 +101,7 @@ func isGlobWithExtension(s string) bool {

func CheckCascadePattern(logger loggers.Logger, m PageMatcher) {
if logger != nil && isGlobWithExtension(m.Path) {
logger.Erroridf("cascade-pattern-with-extension", "cascade target path %q looks like a path with an extension; since Hugo v0.123.0 this will not match anything, see https://gohugo.io/methods/page/path/", m.Path)
logger.Erroridf("cascade-pattern-with-extension", "cascade target path %q looks like a path with an extension; since Hugo v0.123.0 this will not match anything, see https://gohugo.io/docs/reference/methods/page/path/", m.Path)
}
}

Expand Down
2 changes: 1 addition & 1 deletion resources/resource_transformers/tocss/dartsass/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func New(fs *filesystems.SourceFilesystem, rs *resources.Spec) (*Client, error)
}

if !hugo.IsDartSassGeV2() {
return nil, fmt.Errorf("unsupported Dart Sass version detected, please upgrade to Dart Sass 1.63.0 or later, see https://gohugo.io/functions/css/sass/#dart-sass")
return nil, fmt.Errorf("unsupported Dart Sass version detected, please upgrade to Dart Sass 1.63.0 or later, see https://gohugo.io/docs/reference/functions/css/sass/#dart-sass")
}

if err := rs.ExecHelper.Sec().CheckAllowedExec(hugo.DartSassBinaryName); err != nil {
Expand Down
8 changes: 4 additions & 4 deletions resources/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,15 +506,15 @@ func (r *resourceAdapter) transform(key string, publish, setContent bool) (*reso
case "postcss":
// This transformation is not available in this
// Most likely because PostCSS is not installed.
errMsg = ". You need to install PostCSS. See https://gohugo.io/functions/css/postcss/"
errMsg = ". You need to install PostCSS. See https://gohugo.io/docs/reference/functions/css/postcss/"
case "tailwindcss":
errMsg = ". You need to install TailwindCSS CLI. See https://gohugo.io/functions/css/tailwindcss/"
errMsg = ". You need to install TailwindCSS CLI. See https://gohugo.io/docs/reference/functions/css/tailwindcss/"
case "tocss":
errMsg = ". Check your Hugo installation; you need the extended version to build SCSS/SASS with transpiler set to 'libsass'."
case "tocss-dart":
errMsg = ". You need to install Dart Sass, see https://gohugo.io//functions/css/sass/#dart-sass"
errMsg = ". You need to install Dart Sass, see https://gohugo.io/docs/reference/functions/css/sass/#dart-sass"
case "babel":
errMsg = ". You need to install Babel, see https://gohugo.io/functions/js/babel/"
errMsg = ". You need to install Babel, see https://gohugo.io/docs/reference/functions/js/babel/"

}

Expand Down
Loading