Version 5.9

See the changelog of this version for a detailed list of changes.
  • 0.126.0 Minimum required Hugo version

  • Breaking Change requiring action after upgrade

  • Change Change of behavior, may require action

  • New New behavior, often introducing new options


5.9.0 (2022-12-23)

Breaking

  • Breaking With this version it is now possible to not only have sections on the first menu level but also pages.

    It was later discovered, that this causes pages only meant to be displayed in the More section of the menu and stored directly inside your content directory to now show up in the menu as well.

    To get rid of this undesired behavior you have two choices:

    1. Make the page file a headless branch bundle (contained in its own subdirectory and called _index.md) and add the following front matter configuration to the file (see exampleSite’s content/showcase/_index.en.md). This causes its content to not be ontained in the sitemap.

      +++
      title = 'Showcase'
      
      [_build]
        list = 'never'
        publishResources = true
        render = 'always'
      +++
      ---
      _build:
        list: never
        publishResources: true
        render: always
      title: Showcase
      ---
      {
         "_build": {
            "list": "never",
            "publishResources": true,
            "render": "always"
         },
         "title": "Showcase"
      }
    2. Store the page file for below a parent headless branch bundle and add the following front matter to he parent (see exampleSite’s content/more/_index.en.md). Don’t give this page a title as this will cause it to be shown in the breadcrumbs - a thing you most likely don’t want.

      +++
      [_build]
        list = 'never'
        publishResources = false
        render = 'never'
      +++
      ---
      _build:
        list: never
        publishResources: false
        render: never
      ---
      {
         "_build": {
            "list": "never",
            "publishResources": false,
            "render": "never"
         }
      }

      In this case, the file itself can be a branch bundle, leaf bundle or simple page (see exampleSite’s content/more/credits.en.md). This causes its content to be contained in the sitemap.

      +++
      title = 'Credits'
      +++
      ---
      title: Credits
      ---
      {
         "title": "Credits"
      }

Change

  • Change The required directory name for the attachments shortcode was changed for leaf bundles.

    Previously, the attachments for leaf bundles in non-multilang setups were required to be in a files subdirectory. For page bundles and leaf bundles in multilang setups they were always required to be in a _index.<LANGCODE>.files or index.<LANGCODE>.files subdirectory accordingly.

    This added unnecessary complexity. So attachments for leaf bundles in non-multilang setups can now also reside in a index.files directory. Although the old files directory is now deprecated, if both directories are present, only the old files directory will be used for compatibility.

  • Change Absolute links prefixed with http:// or https:// are now opened in a separate browser tab.

    You can revert back to the old behavior by defining externalLinkTarget="_self" in the params section of your hugo.toml.

New