소스 검색

Add custom menu item param to set url function (#601)

Piotr Orzechowski 4 년 전
부모
커밋
427f124aed
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      layouts/partials/header.html
  2. 1 1
      netlify.toml
  3. 1 1
      theme.toml

+ 1 - 1
layouts/partials/header.html

@@ -12,7 +12,7 @@
         {{ with .Site.Menus.main}}
           {{ range sort . }}
             <li class="navigation-item">
-              <a class="navigation-link" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
+              <a class="navigation-link" href="{{ index (apply (slice .URL) (.Params.urlFunc | default "relLangURL") ".") 0 }}">{{ .Name }}</a>
             </li>
           {{ end }}
         {{ end }}

+ 1 - 1
netlify.toml

@@ -3,7 +3,7 @@ publish = "exampleSite/public"
 command = "cd exampleSite && hugo --themesDir=../.. --baseURL $URL"
 
 [build.environment]
-HUGO_VERSION = "0.77.0"
+HUGO_VERSION = "0.79.1"
 HUGO_THEME = "repo"
 
 [context.deploy-preview]

+ 1 - 1
theme.toml

@@ -20,7 +20,7 @@ features = [
   "single-column",
   "syntax-highlighting"
 ]
-min_version = "0.77.0"
+min_version = "0.79.0"
 
 [author]
 name = "Luiz F. A. de Prá"