feat(menu): support open an entry in new tab (#294)
* feat(menu): support open an entry in new tab closes https://github.com/CaiJimmy/hugo-theme-stack/issues/230 * Revert change in markup.tableOfContents.ordered * Upgrade Netlify Hugo version * doc: require Hugo Extended >= 0.87.0
This commit is contained in:
parent
a052245f28
commit
4a0cbac234
@ -31,7 +31,7 @@ Stack is a simple card-style Hugo theme designed for bloggers, some of its featu
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
It's necessary to use **Hugo Extended ≥ 0.78.0**.
|
It's necessary to use **Hugo Extended ≥ 0.87.0**.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
@ -142,6 +142,9 @@ menu:
|
|||||||
url: /
|
url: /
|
||||||
weight: -100
|
weight: -100
|
||||||
pre: home
|
pre: home
|
||||||
|
params:
|
||||||
|
### For demonstration purpose, the home link will be open in a new tab
|
||||||
|
newTab: true
|
||||||
|
|
||||||
related:
|
related:
|
||||||
includeNewer: true
|
includeNewer: true
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
||||||
|
|
||||||
<li {{ if $active }} class='current' {{ end }}>
|
<li {{ if $active }} class='current' {{ end }}>
|
||||||
<a href='{{ .URL }}'>
|
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
||||||
{{ if .Pre }}
|
{{ if .Pre }}
|
||||||
{{ partial "helper/icon" .Pre }}
|
{{ partial "helper/icon" .Pre }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
publish = "exampleSite/public"
|
publish = "exampleSite/public"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
HUGO_VERSION = "0.85.0"
|
HUGO_VERSION = "0.87.0"
|
||||||
HUGO_THEME = "repo"
|
HUGO_THEME = "repo"
|
||||||
|
|
||||||
[context.production]
|
[context.production]
|
||||||
|
Loading…
Reference in New Issue
Block a user