From 29f8b4fa26cbe1c669d9eb1092154d4f346a2203 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Thu, 21 Apr 2022 09:51:09 +0800 Subject: [PATCH] :sparkles: Feat: modify draft menu item rendering logic in mobile header (#99) --- .../content/posts/theme-documentation-basics/index.en.md | 2 +- .../content/posts/theme-documentation-basics/index.zh-cn.md | 2 +- layouts/partials/header.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exampleSite/content/posts/theme-documentation-basics/index.en.md b/exampleSite/content/posts/theme-documentation-basics/index.en.md index ae710727..b1b71264 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.en.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.en.md @@ -1082,7 +1082,7 @@ This helps to distinguish the different contents of preview environment and prod For example: -- [preview environment with draft menu items](https://fixit-1uivrlhmq-lruihao.vercel.app) +- [preview environment with draft menu items](https://fixit-obuxwqlr6-lruihao.vercel.app) - [production environment without draft menu items](https://fixit.lruihao.cn) {{< /admonition >}} diff --git a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md index 15933871..bf1f05c0 100644 --- a/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics/index.zh-cn.md @@ -1093,7 +1093,7 @@ Hugo 有一个简单而强大的 [菜单系统](https://gohugo.io/content-manage 例如: -- [有草稿菜单的预览环境](https://fixit-1uivrlhmq-lruihao.vercel.app) +- [有草稿菜单的预览环境](https://fixit-obuxwqlr6-lruihao.vercel.app) - [没有草稿菜单的生产环境](https://fixit.lruihao.cn) {{< /admonition >}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 8debfe5a..5b80ceb8 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -215,7 +215,7 @@ {{- with .Page -}} {{- $url = .RelPermalink -}} {{- end -}} - {{- if (ne hugo.Environment "production") | or (ne .Params.Draft true) -}} + {{- if (ne .Params.Draft true) | or $BuildDrafts -}}