hugo-tranquilpeak-theme icon indicating copy to clipboard operation
hugo-tranquilpeak-theme copied to clipboard

Add custom menu item param to set url function

Open 0rzech opened this issue 4 years ago • 1 comments

By default, the code will behave the same and no changes in config.yml are required. When needed, there will be now a possibility to customize template function used to generate menu item URLs to allow to link to pages written in another language. Hugo >= 0.79.0 is required to use menu .Params. Example usage:

languages:
  pl:
    menu:
      main:
      - name: Page
        url: /en/page/
        params:
          urlFunc: relURL

0rzech avatar Oct 25 '21 16:10 0rzech

Since is upgrading Hugo required version I'll move to next release

kakawait avatar Oct 27 '21 09:10 kakawait