diff --git a/content/en/configuration/markup.md b/content/en/configuration/markup.md index 0b7f2fe8d..5846564f5 100644 --- a/content/en/configuration/markup.md +++ b/content/en/configuration/markup.md @@ -156,11 +156,10 @@ renderHooks.image.useEmbedded : {{< new-in 0.148.0 />}} : (`string`) When to use the [embedded image render hook]. One of `auto`, `never`, `always`, or `fallback`. Default is `auto`. - - `auto`: Automatically use the embedded image render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. - If a custom image render hook is defined by your project, modules, or themes, it will be utilized instead. - - `never`: Never use the embedded image render hook. If a custom image render hook is defined by your project, modules, or themes, it will be utilized instead. - - `always`: Always use the embedded image render hook, even if a custom image render hook is provided by your project, modules, or themes. In this case, the embedded hook takes precedence. - - `fallback`: Use the embedded image render hook only if no custom image render hook is provided by your project, modules, or themes. If a custom hook exists, it will be used instead. + - `auto`: Automatically use the embedded image render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. If custom image render hooks are defined by your project, modules, or themes, these will be used instead. + - `never`: Never use the embedded image render hook. If custom image render hooks are defined by your project, modules, or themes, these will be used instead. + - `always`: Always use the embedded image render hook, even if custom image render hooks are provided by your project, modules, or themes. In this case, the embedded hook takes precedence. + - `fallback`: Use the embedded image render hook only if custom image render hooks are not provided by your project, modules, or themes. If custom image render hooks exist, these will be used instead. renderHooks.link.enableDefault @@ -171,11 +170,10 @@ renderHooks.link.useEmbedded : {{< new-in 0.148.0 />}} : (`string`) When to use the [embedded link render hook]. One of `auto`, `never`, `always`, or `fallback`. Default is `auto`. - - `auto`: Automatically use the embedded link render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. - If a custom link render hook is defined by your project, modules, or themes, it will be utilized instead. - - `never`: Never use the embedded link render hook. If a custom link render hook is defined by your project, modules, or themes, it will be utilized instead. - - `always`: Always use the embedded link render hook, even if a custom link render hook is provided by your project, modules, or themes. In this case, the embedded hook takes precedence. - - `fallback`: Use the embedded link render hook only if no custom link render hook is provided by your project, modules, or themes. If a custom hook exists, it will be used instead. + - `auto`: Automatically use the embedded link render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. If custom link render hooks are defined by your project, modules, or themes, these will be used instead. + - `never`: Never use the embedded link render hook. If custom link render hooks are defined by your project, modules, or themes, these will be used instead. + - `always`: Always use the embedded link render hook, even if custom link render hooks are provided by your project, modules, or themes. In this case, the embedded hook takes precedence. + - `fallback`: Use the embedded link render hook only if custom link render hooks are not provided by your project, modules, or themes. If custom link render hooks exist, these will be used instead. renderer.hardWraps : (`bool`) Whether to replace newline characters within a paragraph with `br` elements. Default is `false`. diff --git a/content/en/content-management/page-resources.md b/content/en/content-management/page-resources.md index d4ceac6d5..d9bc851a0 100644 --- a/content/en/content-management/page-resources.md +++ b/content/en/content-management/page-resources.md @@ -274,9 +274,9 @@ This approach reduces build times, storage requirements, bandwidth consumption, > [!important] > To resolve Markdown link and image destinations to the correct location, you must use link and image render hooks that capture the page resource with the [`Resources.Get`] method, and then invoke its [`RelPermalink`] method. > -> In its default configuration, Hugo automatically uses the [embedded link render hook] and the [embedded image render hook] for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. +> In its default configuration, Hugo automatically uses the [embedded link render hook] and the [embedded image render hook] for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. If custom link or image render hooks are defined by your project, modules, or themes, these will be used instead. > -> The embedded render hooks will not override any custom link or image render hooks that are provided by your project, modules, or themes. You can change this behavior in your site configuration by setting and [`markup.goldmark.renderHooks.link.useEmbedded`] and [`markup.goldmark.renderHooks.image.useEmbedded`] . +> You can also configure Hugo to `always` use the embedded link or image render hook, use it only as a `fallback`, or `never` use it. See [details](/configuration/markup/#renderhookslinkuseembedded). Although duplicating shared page resources is inefficient, you can enable this feature in your site configuration if desired: diff --git a/content/en/methods/page/GitInfo.md b/content/en/methods/page/GitInfo.md index 90dc3870a..c83645226 100644 --- a/content/en/methods/page/GitInfo.md +++ b/content/en/methods/page/GitInfo.md @@ -5,7 +5,7 @@ categories: [] keywords: [] params: functions_and_methods: - returnType: source.GitInfo + returnType: '*gitmap.GitInfo' signatures: [PAGE.GitInfo] --- @@ -119,7 +119,9 @@ hugo --enableGitInfo ### Ancestors -(`*source.GitInfo`) The file-filtered ancestor commits, if any. +(`gitmap.GitInfos`) A slice of file-filtered ancestor commits, if any, ordered from most recent to least recent. + +For example, to list the last 5 commits: ```go-html-template {{ with .GitInfo }} @@ -129,9 +131,19 @@ hugo --enableGitInfo {{ end }} ``` +To reverse the order: + +```go-html-template +{{ with .GitInfo }} + {{ range .Ancestors.Reverse | first 5 }} + {{ .CommitDate.Format "2006-01-02" }}: {{ .Subject }} + {{ end }} +{{ end }} +``` + ### Parent -(`*source.GitInfo`) The first file-filtered ancestor commit, if any. +(`*gitmap.GitInfo`) The first file-filtered ancestor commit, if any. ## Last modified date diff --git a/content/en/render-hooks/images.md b/content/en/render-hooks/images.md index 2ea32fe1a..ae043e477 100755 --- a/content/en/render-hooks/images.md +++ b/content/en/render-hooks/images.md @@ -101,10 +101,16 @@ wrapStandAloneImageWithinParagraph = false {{< new-in 0.123.0 />}} -Hugo includes an [embedded image render hook] to resolve Markdown image destinations. +Hugo includes an [embedded image render hook] to resolve Markdown image destinations. You can adjust its behavior in your site configuration. This is the default setting: -> [!important] -> In its default configuration, Hugo automatically uses the embedded image render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. The default behavior will not override any custom image render hooks that are provided by your project, modules, or themes. You can change this behavior in your site configuration. See [details](/configuration/markup/#renderhooksimageuseembedded). +{{< code-toggle file=hugo >}} +[markup.goldmark.renderHooks.image] +useEmbedded = 'auto' +{{< /code-toggle >}} + +When set to `auto` as shown above, Hugo automatically uses the embedded image render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. If custom image render hooks are defined by your project, modules, or themes, these will be used instead. + +You can also configure Hugo to `always` use the embedded image render hook, use it only as a `fallback`, or `never` use it. See [details](/configuration/markup/#renderhooksimageuseembedded). The embedded image render hook resolves internal Markdown destinations by looking for a matching [page resource](g), falling back to a matching [global resource](g). Remote destinations are passed through, and the render hook will not throw an error or warning if unable to resolve a destination. diff --git a/content/en/render-hooks/links.md b/content/en/render-hooks/links.md index e97de0c68..08047b026 100755 --- a/content/en/render-hooks/links.md +++ b/content/en/render-hooks/links.md @@ -74,10 +74,16 @@ To include a `rel` attribute set to `external` for external links: {{< new-in 0.123.0 />}} -Hugo includes an [embedded link render hook] to resolve Markdown link destinations. +Hugo includes an [embedded link render hook] to resolve Markdown link destinations. You can adjust its behavior in your site configuration. This is the default setting: -> [!important] -> In its default configuration, Hugo automatically uses the embedded link render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. The default behavior will not override any custom link render hooks that are provided by your project, modules, or themes. You can change this behavior in your site configuration. See [details](/configuration/markup/#renderhookslinkuseembedded). +{{< code-toggle file=hugo >}} +[markup.goldmark.renderHooks.link] +useEmbedded = 'auto' +{{< /code-toggle >}} + +When set to `auto` as shown above, Hugo automatically uses the embedded link render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. If custom link render hooks are defined by your project, modules, or themes, these will be used instead. + +You can also configure Hugo to `always` use the embedded link render hook, use it only as a `fallback`, or `never` use it. See [details](/configuration/markup/#renderhookslinkuseembedded). The embedded link render hook resolves internal Markdown destinations by looking for a matching page, falling back to a matching [page resource](g), then falling back to a matching [global resource](g). Remote destinations are passed through, and the render hook will not throw an error or warning if unable to resolve a destination. diff --git a/content/en/shortcodes/ref.md b/content/en/shortcodes/ref.md index 2fb8ee760..3baa0a52a 100755 --- a/content/en/shortcodes/ref.md +++ b/content/en/shortcodes/ref.md @@ -12,7 +12,9 @@ keywords: [] > [!note] > When working with Markdown this shortcode is obsolete. Instead, to properly resolve Markdown link destinations, use the [embedded link render hook] or create your own. > -> In its default configuration, Hugo automatically uses the embedded link render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. The default behavior will not override any custom link render hooks that are provided by your project, modules, or themes. You can change this behavior in your site configuration. See [details](/configuration/markup/#renderhookslinkuseembedded). +> In its default configuration, Hugo automatically uses the embedded link render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. If custom link render hooks are defined by your project, modules, or themes, these will be used instead. +> +> You can also configure Hugo to `always` use the embedded link render hook, use it only as a `fallback`, or `never` use it. See [details](/configuration/markup/#renderhookslinkuseembedded). ## Usage diff --git a/content/en/shortcodes/relref.md b/content/en/shortcodes/relref.md index c94b691a2..e94ad9ebc 100755 --- a/content/en/shortcodes/relref.md +++ b/content/en/shortcodes/relref.md @@ -12,7 +12,9 @@ keywords: [] > [!note] > When working with Markdown this shortcode is obsolete. Instead, to properly resolve Markdown link destinations, use the [embedded link render hook] or create your own. > -> In its default configuration, Hugo automatically uses the embedded link render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. The default behavior will not override any custom link render hooks that are provided by your project, modules, or themes. You can change this behavior in your site configuration. See [details](/configuration/markup/#renderhookslinkuseembedded). +> In its default configuration, Hugo automatically uses the embedded link render hook for multilingual single-host sites, specifically when the [duplication of shared page resources] feature is disabled. This is the default behavior for such sites. If custom link render hooks are defined by your project, modules, or themes, these will be used instead. +> +> You can also configure Hugo to `always` use the embedded link render hook, use it only as a `fallback`, or `never` use it. See [details](/configuration/markup/#renderhookslinkuseembedded). ## Usage diff --git a/data/docs.yaml b/data/docs.yaml index 62c8919a0..f6d2a96ae 100644 --- a/data/docs.yaml +++ b/data/docs.yaml @@ -189,6 +189,9 @@ chroma: - Aliases: - coq Name: Coq + - Aliases: + - core + Name: Core - Aliases: - cr - crystal @@ -515,6 +518,10 @@ chroma: - Aliases: - monkeyc Name: MonkeyC + - Aliases: + - moonscript + - moon + Name: MoonScript - Aliases: - morrowind - mwscript @@ -1253,8 +1260,10 @@ config: renderHooks: image: enableDefault: false + useEmbedded: auto link: enableDefault: false + useEmbedded: auto renderer: hardWraps: false unsafe: false