mirror of
https://github.com/kbenestad/mdcms.git
synced 2026-06-18 15:24:32 +00:00
- Add renderTocTag(): groups visible pages by section in section sort order; sorts pages within each section by sort then filename; excludes current page, draft sections, and category-invisible pages; renders section headings and linked page lists; replaces the tag placeholder - Add toc dispatch in hydrateMdcmsTags() - Add .mdcms-toc, .mdcms-toc-section, .mdcms-toc-list CSS https://claude.ai/code/session_015XtsgTMi8UtmgxEgb5Qt2c
26 lines
485 B
Markdown
26 lines
485 B
Markdown
---
|
|
title: Home
|
|
sort: 100
|
|
---
|
|
|
|
# Phase 5 — Table of Contents Tag
|
|
|
|
The `toc` tag renders a section-grouped list of all pages visible for the active category. The TOC page itself is excluded.
|
|
|
|
---
|
|
|
|
## Basic TOC
|
|
|
|
```mdcms
|
|
toc
|
|
```
|
|
|
|
---
|
|
|
|
## What to verify
|
|
|
|
- All sections appear as headings in sort order
|
|
- Pages within each section appear in sort order
|
|
- This page (Home) does **not** appear in the list
|
|
- Draft pages are excluded
|
|
- Switching category (if enabled) updates the page list
|