Skip to content
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
1 change: 1 addition & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@
hugo_frontmatter = "https://gohugo.io/content-management/front-matter"
hugo_goldmark = "https://gohugo.io/getting-started/configuration-markup/#goldmark"
hugo_headless = "https://gohugo.io/content-management/page-bundles/#headless-bundle"
hugo_highlight = "https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode"
hugo_i18n = "https://gohugo.io/functions/i18n"
hugo_image = "https://gohugo.io/content-management/image-processing"
hugo_lang = "https://gohugo.io/content-management/multilingual"
Expand Down
13 changes: 13 additions & 0 deletions content/en/docs/latest/components/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,16 @@ Set `full` to `false` to show the filename only.
{{</* file full="false" path="./config/_default/languages.toml" id="file-collapse-5" */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->

### Syntax highlighting

{{< release version="0.27.6" >}}

Use the {{< link hugo_highlight >}}Hugo syntax highlighting options{{< /link >}} for marking lines in the file. Pass the settings to the `options` argument.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
{{</* file full="false" path="./config/_default/languages.toml" id="file-collapse-5"
options="linenos=table,hl_lines=2-4 6,linenostart=10" */>}}
{{< /example >}}
<!-- markdownlint-enable MD037 -->
10 changes: 5 additions & 5 deletions content/en/docs/latest/content/links-and-cross-references.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Links and cross-references
description: Generate internal links and external links using native Markdown links or a Hugo shortcode.
date: 2024-08-17
date: 2024-10-25
layout: docs
---

Expand All @@ -14,19 +14,19 @@ Hugo provides the shortcode `ref` to link to another page within the site. The s

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
[Tables]({{%/*ref "tables" */%}})
[Tables]({{%/* ref "tables" */%}})

[About]({{%/*ref "credits" */%}})
[About]({{%/* ref "credits" */%}})
{{< /example >}}
<!-- markdownlint-enable MD037 -->

Similar to the `ref` shortcode, Hugo provides the shortcode `relref` to return a path relative to the current page.

<!-- markdownlint-disable MD037 -->
{{< example lang="hugo" >}}
[Tables]({{%/*relref "tables" */%}})
[Tables]({{%/* relref "tables" */%}})

[About]({{%/*relref "credits" */%}})
[About]({{%/* relref "credits" */%}})
{{< /example >}}
<!-- markdownlint-enable MD037 -->

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.20

require (
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
github.com/gethinode/hinode v0.27.4 // indirect
github.com/gethinode/hinode v0.27.7 // indirect
github.com/gethinode/mod-bootstrap v1.3.1 // indirect
github.com/gethinode/mod-cookieyes/v2 v2.2.2 // indirect
github.com/gethinode/mod-csp v1.0.3 // indirect
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ github.com/gethinode/hinode v0.27.0 h1:swZxhrSl1EFrs5THenuw6/RDfXI4gU2P1tghJQayw
github.com/gethinode/hinode v0.27.0/go.mod h1:uiMTMa+EUMB36nUAGWBU8B27imztTuCH2pWLMqGc7hM=
github.com/gethinode/hinode v0.27.4 h1:j32dVOTv7ClN34KeOYIO9TOq/0N/mwXAqJXqQDQ/xk0=
github.com/gethinode/hinode v0.27.4/go.mod h1:fPC0mX3UnMr8WlI2EK01VP89FxBNXs5/3po2f4b5Z7U=
github.com/gethinode/hinode v0.27.5 h1:5HFL1ll9mYOmfeQNrM06lzLlD4D1hwxe5GoU7IZxwo0=
github.com/gethinode/hinode v0.27.5/go.mod h1:fPC0mX3UnMr8WlI2EK01VP89FxBNXs5/3po2f4b5Z7U=
github.com/gethinode/hinode v0.27.6 h1:R2eEUqv6P50ps5myPQOlH+jargfyWzYiilV5RNTHrh4=
github.com/gethinode/hinode v0.27.6/go.mod h1:fPC0mX3UnMr8WlI2EK01VP89FxBNXs5/3po2f4b5Z7U=
github.com/gethinode/hinode v0.27.7 h1:dpwQeehYq2eh8/HveTzjlvZTFPREgh9q3t9VKN08zw8=
github.com/gethinode/hinode v0.27.7/go.mod h1:fPC0mX3UnMr8WlI2EK01VP89FxBNXs5/3po2f4b5Z7U=
github.com/gethinode/mod-bootstrap v1.1.0 h1:BbalsW8kmFhv+J+dcc41TGcjIlM/p69AB0h0oGhAXIU=
github.com/gethinode/mod-bootstrap v1.1.0/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8=
github.com/gethinode/mod-bootstrap v1.1.1 h1:Tx4M5hGVOFrEaxnUONDAm6N9xuRi5UphKlT7F26HujU=
Expand Down
4 changes: 4 additions & 0 deletions hugo_stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@
"multi-docs-collapse-76",
"multi-docs-collapse-8",
"multi-docs-collapse-9",
"multi-file-collapse-0",
"multi-file-collapse-1",
"multi-file-collapse-10",
"multi-file-collapse-11",
Expand Down Expand Up @@ -992,6 +993,7 @@
"body-docs-collapse-76",
"body-docs-collapse-8",
"body-docs-collapse-9",
"body-file-collapse-0",
"body-file-collapse-1",
"body-file-collapse-10",
"body-file-collapse-11",
Expand Down Expand Up @@ -1282,6 +1284,7 @@
"footer-docs-collapse-76",
"footer-docs-collapse-8",
"footer-docs-collapse-9",
"footer-file-collapse-0",
"footer-file-collapse-1",
"footer-file-collapse-10",
"footer-file-collapse-11",
Expand Down Expand Up @@ -1539,6 +1542,7 @@
"supported-primitive-types",
"supported-providers",
"supporting-redirection",
"syntax-highlighting",
"table-borders",
"table-of-contents",
"tables-without-borders",
Expand Down