Skip to content

[改进]修复sidebar_root_menu: false的相关问题 - #43

Merged
Vonng merged 1 commit into
pgsty:mainfrom
MagicFollower:main
Sep 19, 2026
Merged

Vonng merged 1 commit into
pgsty:mainfrom
MagicFollower:main

Conversation

@MagicFollower

Copy link
Copy Markdown
Contributor

【解决的问题】
主题原版 root-menu-roots.html 在收集「自根页面」时未检查 sidebar_root_menu 字段,
导致即使设置了 sidebar_root_menu: false 也无法从侧边栏的下拉卡片列表中隐藏该条目。
本覆盖文件在第二个循环中补充了 (ne .Params.sidebar_root_menu false) 判断,
使 sidebar_root_menu: false 对两类来源均生效。

本次修复会使得下面配置中的sidebar_root_menu: false 生效

---
title: 博客
description: 技术文章、学习笔记与心得体会。
type: blog
icon: fa-solid fa-blog
sidebar_root_for: self
sidebar_root_link_self: true
sidebar_root_menu: false   // ← LOOK ME
menus:
  main:
    identifier: blog
    weight: 10
cascade:
  type: blog
  footer_style: slim
  reading_time: true
---

在这里记录技术思考、学习心得与实践经验。

… sidebar_root_menu: false 也无法从侧边栏下拉卡片列表中隐藏该条目。当前在第二个循环中补充了 (ne .Params.sidebar_root_menu false) 判断,使 sidebar_root_menu: false 对两类来源均生效。
@Vonng
Vonng merged commit 6e81408 into pgsty:main Sep 19, 2026
Vonng added a commit that referenced this pull request Sep 19, 2026
Preserve PR #43 and cover root-menu exclusions. Centralize sidebar disclosures and isolate hidden navigation; keep pointer reading focus quiet; retain group-only child navigation and publication output; add a bounded search-tail registration API.

Refs #40, #41, #42, #44. Bilingual contracts and browser acceptance live in the sibling documentation repository.
@Vonng

Vonng commented Sep 20, 2026

Copy link
Copy Markdown
Member

Thanks for the focused fix, @MagicFollower! Your PR has been merged and is included in v1.1.0.

Explicit sidebar_root_menu: false now works for nested self-roots as well as top-level sections. We've added regression coverage and documented the behavior, including the current root remaining as a location marker while browsing that section.

Thank you for contributing to OINK!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants