mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-09-03 04:02:40 +00:00
✨ Feat: modify draft menu item rendering logic in mobile header (#99)
This commit is contained in:
@@ -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 >}}
|
||||
|
||||
|
||||
@@ -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 >}}
|
||||
|
||||
|
||||
@@ -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 -}}
|
||||
<li
|
||||
class="menu-item{{ if $.IsMenuCurrent `main` . | or ($.HasMenuCurrent `main` .) | or (eq $.RelPermalink $url) }} active{{ end }}{{ with .Params.Class }} {{ . }}{{ end }}"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user