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

[pull] master from gohugoio:master #174

Merged
merged 6 commits into from
Jan 6, 2025
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 commands/commandeer.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ Complete documentation is available at https://gohugo.io/.`
cmd.PersistentFlags().StringP("themesDir", "", "", "filesystem path to themes directory")
_ = cmd.MarkFlagDirname("themesDir")
cmd.PersistentFlags().StringP("ignoreVendorPaths", "", "", "ignores any _vendor for module paths matching the given Glob pattern")
cmd.PersistentFlags().BoolP("noBuildLock", "", false, "don't create .hugo_build.lock file")
_ = cmd.RegisterFlagCompletionFunc("ignoreVendorPaths", cobra.NoFileCompletions)
cmd.PersistentFlags().String("clock", "", "set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00")
_ = cmd.RegisterFlagCompletionFunc("clock", cobra.NoFileCompletions)
Expand Down Expand Up @@ -593,7 +594,6 @@ func applyLocalFlagsBuild(cmd *cobra.Command, r *rootCommand) {
cmd.Flags().BoolVar(&r.forceSyncStatic, "forceSyncStatic", false, "copy all files when static is changed.")
cmd.Flags().BoolP("noTimes", "", false, "don't sync modification time of files")
cmd.Flags().BoolP("noChmod", "", false, "don't sync permission mode of files")
cmd.Flags().BoolP("noBuildLock", "", false, "don't create .hugo_build.lock file")
cmd.Flags().BoolP("printI18nWarnings", "", false, "print missing translations")
cmd.Flags().BoolP("printPathWarnings", "", false, "print warnings on duplicate target paths etc.")
cmd.Flags().BoolP("printUnusedTemplates", "", false, "print warnings on unused templates.")
Expand Down
7 changes: 7 additions & 0 deletions common/hashing/hashing.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ func HashString(vs ...any) string {
return strconv.FormatUint(hash, 10)
}

// HashStringHex returns a hash from the given elements as a hex encoded string.
// See HashString for more information.
func HashStringHex(vs ...any) string {
hash := HashUint64(vs...)
return strconv.FormatUint(hash, 16)
}

var hashOptsPool = sync.Pool{
New: func() any {
return &hashstructure.HashOptions{
Expand Down
10 changes: 6 additions & 4 deletions create/content.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,13 @@ func NewContent(h *hugolib.HugoSites, kind, targetPath string, force bool) error
b.setArcheTypeFilenameToUse(ext)

withBuildLock := func() (string, error) {
unlock, err := h.BaseFs.LockBuild()
if err != nil {
return "", fmt.Errorf("failed to acquire a build lock: %s", err)
if !h.Configs.Base.NoBuildLock {
unlock, err := h.BaseFs.LockBuild()
if err != nil {
return "", fmt.Errorf("failed to acquire a build lock: %s", err)
}
defer unlock()
}
defer unlock()

if b.isDir {
return "", b.buildDir()
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions docs/_vendor/modules.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# github.com/gohugoio/gohugoioTheme v0.0.0-20241119115653-b92d27ede3e1

# github.com/gohugoio/gohugoioTheme v0.0.0-20250106044328-feb60697e056
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ See each sub-command's help for details on how to use the generated script.
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_completion_bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ hugo completion bash
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_completion_fish.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ hugo completion fish [flags]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_completion_powershell.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ hugo completion powershell [flags]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_completion_zsh.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ hugo completion zsh [flags]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ hugo config [command] [flags]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_config_mounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ hugo config mounts [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_convert.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ See convert's subcommands toJSON, toTOML and toYAML for more information.
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_convert_toJSON.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ hugo convert toJSON [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
-o, --output string filesystem path to write files to
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_convert_toTOML.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ hugo convert toTOML [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
-o, --output string filesystem path to write files to
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_convert_toYAML.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ hugo convert toYAML [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
-o, --output string filesystem path to write files to
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ hugo deploy [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_env.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ hugo env [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_gen.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Generate documentation for your project using Hugo's documentation engine, inclu
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_gen_chromastyles.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ hugo gen chromastyles [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_gen_doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ hugo gen doc [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_gen_man.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ hugo gen man [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_import.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_p
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_import_jekyll.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ hugo import jekyll [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ List requires a subcommand, e.g. hugo list drafts
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_list_all.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ hugo list all [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_list_drafts.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ hugo list drafts [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_list_expired.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ hugo list expired [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_list_future.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ hugo list future [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_list_published.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ hugo list published [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ See https://gohugo.io/hugo-modules/ for more information.
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/commands/hugo_mod_clean.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ hugo mod clean [flags] [args]
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
Expand Down
Loading
Loading