From 4a0cbac23457070a46a798c6ae4e0c9d3122e7f3 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sun, 8 Aug 2021 17:39:33 +0200 Subject: [PATCH] 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 --- README.md | 2 +- exampleSite/config.yaml | 3 +++ layouts/partials/sidebar/left.html | 2 +- netlify.toml | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c1157a2..ddacf82 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Stack is a simple card-style Hugo theme designed for bloggers, some of its featu ## Requirements -It's necessary to use **Hugo Extended ≥ 0.78.0**. +It's necessary to use **Hugo Extended ≥ 0.87.0**. ## Installation diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 4046887..ac67c62 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -142,6 +142,9 @@ menu: url: / weight: -100 pre: home + params: + ### For demonstration purpose, the home link will be open in a new tab + newTab: true related: includeNewer: true diff --git a/layouts/partials/sidebar/left.html b/layouts/partials/sidebar/left.html index af483e3..c14092f 100644 --- a/layouts/partials/sidebar/left.html +++ b/layouts/partials/sidebar/left.html @@ -39,7 +39,7 @@ {{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
  • - + {{ if .Pre }} {{ partial "helper/icon" .Pre }} {{ end }} diff --git a/netlify.toml b/netlify.toml index e221fd8..2a5b2a8 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,7 +2,7 @@ publish = "exampleSite/public" [build.environment] - HUGO_VERSION = "0.85.0" + HUGO_VERSION = "0.87.0" HUGO_THEME = "repo" [context.production]