Hinode logo
  • About 
  • Docs 
  • Components 
  • Guides 
  • Releases 
  •  
Docs
  • Getting Started
    • Introduction
    • Commands
    • Hosting and Deployment
    • Upgrading
    • Private Modules and Packages
    • Contribute
    • Troubleshooting
  • Content
    • Content Management
    • Content Organization
    • Typography
    • Links and Cross-References
    • Images and Figures
    • Tables
    • Icons
  • Configuration
    • Layout
    • Colors
    • Color Modes
    • Fonts
    • Languages
    • Navigation
    • Documentation
    • Analytics
    • Modules
    • Cookie Consent
    • Digital Asset Managers
  • Components
    • Abbr
    • Accordion
    • Alert
    • Animation
    • Args
    • Badge
    • Breadcrumb
    • Button
    • Button Group
    • Card
    • Card Group
    • Carousel
    • Collapse
    • Command Prompt
    • Docs
    • Example
    • File
    • Icon
    • Image
    • Ins
    • Kbd
    • Link
    • Map
    • Mark
    • Navbar
    • Navs and Tabs
    • Persona
    • Release
    • Spinner
    • Sub
    • Sup
    • Table
    • Timeline
    • Toast
    • Tooltip
    • Video
  • Advanced Settings
    • Overview
    • Styles
    • Scripts
    • Icons
    • Partial Development
    • Module Development
    • Server Headers
    • Server-Side Redirection
  • About
    • Credits
    • License
  • Getting Started
    • Introduction
    • Commands
    • Hosting and Deployment
    • Upgrading
    • Private Modules and Packages
    • Contribute
    • Troubleshooting
  • Content
    • Content Management
    • Content Organization
    • Typography
    • Links and Cross-References
    • Images and Figures
    • Tables
    • Icons
  • Configuration
    • Layout
    • Colors
    • Color Modes
    • Fonts
    • Languages
    • Navigation
    • Documentation
    • Analytics
    • Modules
    • Cookie Consent
    • Digital Asset Managers
  • Components
    • Abbr
    • Accordion
    • Alert
    • Animation
    • Args
    • Badge
    • Breadcrumb
    • Button
    • Button Group
    • Card
    • Card Group
    • Carousel
    • Collapse
    • Command Prompt
    • Docs
    • Example
    • File
    • Icon
    • Image
    • Ins
    • Kbd
    • Link
    • Map
    • Mark
    • Navbar
    • Navs and Tabs
    • Persona
    • Release
    • Spinner
    • Sub
    • Sup
    • Table
    • Timeline
    • Toast
    • Tooltip
    • Video
  • Advanced Settings
    • Overview
    • Styles
    • Scripts
    • Icons
    • Partial Development
    • Module Development
    • Server Headers
    • Server-Side Redirection
  • About
    • Credits
    • License

Links and Cross-References

Share via
Hinode
Link copied to clipboard

Generate internal links and external links using native Markdown links or a Hugo shortcode.

On this page
Internal Links   Cross-References   External Links   Basic Links   Asset Links   URLs and Email Addresses   Reference-Style Links   Managed Links   Shortcode Links  

Internal Links  

  Important

Since release v0.26.0  , Hinode renders all links using a render hook. The support for markdown links requires that any named links use the {{% myshortcode %}} notation instead of {{< myshortcode >}} notation going forward.

Hugo provides the shortcode ref to link to another page within the site. The shortcode returns an absolute path. You can provide the document path as input. If you omit the leading /, the page is first resolved relative to the current page, then to the remainder of the site. Review Hugo’s Documentation  for more examples and advanced options.

Tables

About

markdown
[Tables]({{% ref "tables" %}})

[About]({{% ref "credits" %}})

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

Tables

About

markdown
[Tables]({{% relref "tables" %}})

[About]({{% relref "credits" %}})

Cross-References  

When using Markdown document types, Hugo generates element IDs for every heading on a page. Spaces are replaced with -. For example:

## An example reference

produces the following HTML:

<h2 id="an-example-reference">An example reference</h2>

You can add a cross-reference to the section heading by specifying the generated ID as input for the ref and relref shortcodes, preceded by a #.

Reference

Reference

markdown
[Reference]({{% ref "#reference" %}})

[Reference]({{% relref "#reference" %}})

External Links  

Hugo supports basic Markdown to create links to external websites. The following sections explain the various options.

Basic Links  

Hugo supports basic Markdown to create links to external websites. To create a link, enclose the link text in brackets (e.g., [Duck Duck Go]) and then follow it immediately with the URL in parentheses (e.g., (https://duckduckgo.com)).

My favorite search engine is Duck Duck Go  .
markdown
My favorite search engine is [Duck Duck Go](https://duckduckgo.com).

Asset Links  

Hinode supports validated links to published assets since release v0.26.3  . Store the assets as either Page Resource  or in the site’s static folder. Pending on the media type, the browser will open or download the file.

The following example opens an image stored in the static folder (photo by Christiane S Hartl  on Unsplash  ) in the current window.

View Example Image
markdown
[View example image](/img/sample-frog.jpg)

URLs and Email Addresses  

To quickly turn a URL or email address into a link, enclose it in angle brackets.

https://www.markdownguide.org 

fake@example.com

markdown
<https://www.markdownguide.org>

<fake@example.com>

Reference-Style Links  

Instead of using parentheses, you can use brackets to link to a predefined address. The following example uses a named reference to link to the website of Font Awesome.

Font Awesome 
markdown
[Font Awesome][fontawesome]

[fontawesome]: https://fontawesome.com

Managed Links  

Hinode uses config/_default/params.toml to manage links to external addresses in a single place. You can Use the Link Shortcode to Generate a Managed Link. The following snippet of config/_default/params.toml defines the link address for fontawesome:

[links]
    fontawesome = "https://fontawesome.com"

You can then use the following statement to generate the link.

fontawesome.com 
markdown
{{< link fontawesome />}}

You can Configure the Behavior of Managed Links in the /config/_default/params.toml file in the main.externalLinks section.

Shortcode Links  

You can also use the Link shortcode as convenience.

• Update to Hinode v0.27.13 (b6f5054)
On this page:
Internal Links   Cross-References   External Links   Basic Links   Asset Links   URLs and Email Addresses   Reference-Style Links   Managed Links   Shortcode Links  
Links and cross-references
Links and cross-references
Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5.
Code licensed MIT, docs CC BY-NC 4.0
Currently v0.29.3
Privacy | Cookies
 
Links
Home 
About 
Docs 
Components 
Releases 
Guides
Getting Started 
Developing Modules 
Optimization 
Versioning 
Community
Issues   
Discussions   
Contribute 
Hinode
Code copied to clipboard