# 主题全面修复与优化计划
## 🔴 紧急:修复 500 报错(最高优先级)
### 根因分析
Docker 日志显示错误:
```
TemplateProcessingException: Exception evaluating SpringEL expression:
"#strings.equals(#request.requestURI, menuItem.status.href)"
```
**原因**:Halo 使用 Spring WebFlux(非 Spring MVC),`#request` 对象在 WebFlux 环境中不可用。上一轮在 Navbar.astro 和 MobileMenu.astro 中添加的 `th:classappend="${#strings.equals(#request.requestURI, menuItem.status.href)}"` 导致了全站 500 错误。
### 额外问题:SEO 标签与 Halo 自动注入冲突
根据 Halo Thymeleaf 最佳实践文档,Halo 会**自动注入**以下 SEO 标签:
- `` 和 ``
- Open Graph 标签(og:title, og:description, og:image 等)
- Twitter Card 标签和 canonical URL
我们在 Layout.astro、post.astro、page.astro 中手动添加的这些标签会与 Halo 自动注入的冲突,需要移除。
### 修改文件
#### 1. Navbar.astro(第 34 行)
移除 `th:classappend`,改用 JS 方案实现导航高亮:
```html
```
在 Navbar.astro 的 `