Skip to content

deckhouse/hugo-web-product-module

Hugo module for the Deckhouse websites

This is the source for the Hugo module, used in Deckhouse documentation websites of the Deckhouse products.

Some ideas and code snippets are borrowed from the Docsy Hugo theme.

Usage

Add it in your hugo configuration.

For the local development, you can use the following replace directive in your go.mod:

replace github.com/deckhouse/hugo-web-product-module => ../hugo-web-product-module

or use use the modules configuration replacements option.

The Hugo version assumed to be 0.150.1. But it maybe will work with higher versions as well.

Creating new Deckhouse product website

  1. Use the folder project_template as a template for your new Deckhouse product website.
  2. Add content in the content folder and customize the configuration in the config folder.
    • Define product name and baseURL the config/_default/hugo.yaml file.

Structure of the content

...coming soon...

Markup

The project uses Hugo SSG and the hugo-web-product-module module for a theme.

The documentation content is written in Markdown with some custom shortcodes.

Page parameters (front matter)

Related links

params:
  relatedLinks:
    - title: "Link"
      url: link.html
    - title: "External link"
      url: "http://domain/external/link.html"
    - url: /modules/monitoring-kubernetes/

Shortcodes

Alert

There are following levels of alerts: info, warning, danger. The default level is info.

{{< alert level="warning" >}}
The warning message...
{{< /alert >}}

Tabs

{{< tabs >}}
{{% tab "MacOS" %}} # MacOS Content {{% /tab %}}
{{% tab "Linux" %}} # Linux Content {{% /tab %}}
{{% tab "Windows" %}} # Windows Content {{% /tab %}}
{{< /tabs >}}

Translate

Translates content based on the current language using the translations defined in the i18n folder.

{{< translate "version_of_module" >}}

Details

{{% details "Summary..."%}}
## Markdown content

Markdown content...
{{% /details %}}

Partials

Details

The same as the details shortcode, but used in templates.

{{ partial "details" ( dict "summary" "Summary..." "content" "Markdown content..." ) }}

Alert

The same as the alert shortcode, but used in templates.

{{ partial "alert" ( dict "level" "warning" "content" "Markdown content..." ) }}

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •