Skip to content
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

Fix documentation for changing the suffix of the HTML output format from html (default) to htm #2648

Closed
wants to merge 4 commits into from

Conversation

npadgett
Copy link
Contributor

No description provided.

Fixed syntax error
Fixed configuration error for example.
Update configuration so output format of htm is a mirror of html
@jmooring
Copy link
Member

In content/en/templates/output-formats.md, why did you change the name of the output format? That is not necessary if all you want to do is change the extension from html to htm.

@npadgett
Copy link
Contributor Author

In content/en/templates/output-formats.md, why did you change the name of the output format? That is not necessary if all you want to do is change the extension from html to htm.

If I don't, I get the following error:

% hugo server -D
Watching for changes in /Users/redacted/Documents/projects/redacted/{archetypes,assets,content,data,i18n,layouts,static}
Watching for config changes in /Users/redacted/Documents/projects/redacted/hugo.toml
Start building sites … 
hugo v0.128.2+extended darwin/arm64 BuildDate=2024-07-04T08:13:25Z VendorInfo=brew

panic: runtime error: index out of range [0] with length 0

goroutine 51 [running]:
github.com/gohugoio/hugo/hugolib.(*pageState).shiftToOutputFormat(0x14000186770, 0x1, 0x0)
	github.com/gohugoio/hugo/hugolib/page.go:667 +0x468
github.com/gohugoio/hugo/hugolib.(*sitePagesAssembler).assembleResources.func1({0x140000639d8?, 0x1400088a908?}, {0x1040e2b20?, 0x14000186770}, 0x70?)
	github.com/gohugoio/hugo/hugolib/content_map_page.go:1701 +0xdc
github.com/gohugoio/hugo/hugolib/doctree.(*NodeShiftTreeWalker[...]).Walk.func1({0x1040a4da0, 0x14000186770})
	github.com/gohugoio/hugo/hugolib/doctree/nodeshifttree.go:377 +0x108
github.com/armon/go-radix.recursiveWalk(0x14000300840, 0x14000063970)
	github.com/armon/[email protected]/radix.go:523 +0x48
github.com/armon/go-radix.(*Tree).Walk(...)
	github.com/armon/[email protected]/radix.go:453
github.com/gohugoio/hugo/hugolib/doctree.(*NodeShiftTreeWalker[...]).Walk(0x1040ea080?, {0x102184931?, 0x3?})
	github.com/gohugoio/hugo/hugolib/doctree/nodeshifttree.go:387 +0x100
github.com/gohugoio/hugo/hugolib.(*sitePagesAssembler).assembleResources(0x14000cbb3e0)
	github.com/gohugoio/hugo/hugolib/content_map_page.go:1794 +0xcc
github.com/gohugoio/hugo/hugolib.(*sitePagesAssembler).assemblePagesStepFinal(...)
	github.com/gohugoio/hugo/hugolib/content_map_page.go:1828
github.com/gohugoio/hugo/hugolib.(*HugoSites).assemble(0x140009eeb40, {0x1040dce48, 0x1055399e0}, {0x1040e5cf0?, 0x14000116ae0?}, 0x14000329e80)
	github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:332 +0x624
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func4()
	github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:152 +0xec
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build(0x140009eeb40, {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, {0x0, ...})
	github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:159 +0x540
github.com/gohugoio/hugo/commands.(*hugoBuilder).buildSites(0x0?, 0x0)
	github.com/gohugoio/hugo/commands/hugobuilder.go:426 +0x80
github.com/gohugoio/hugo/commands.(*hugoBuilder).fullBuild.func3()
	github.com/gohugoio/hugo/commands/hugobuilder.go:542 +0x24
golang.org/x/sync/errgroup.(*Group).Go.func1()
	golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x58
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
	golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x98

@jmooring
Copy link
Member

A panic is a bug, not a documentation issue. Please log a bug:
https://github.com/gohugoio/hugo/issues

And be sure to provide a minimal reproducible example.

@jmooring jmooring closed this Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants