Closed Bug 810430 Opened 12 years ago Closed 7 years ago

Add table of contents section list to document JSON view

Categories

(developer.mozilla.org Graveyard :: API, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: lorchard, Unassigned)

Details

(Whiteboard: [type:feature])

For code samples, and maybe even link building, it would be great to include a section tree in the json_view output just like what gets built for the table of contents. Include section IDs and header titles where available. For bonus points, check whether each section contains one or more of pre.html, pre.css, and/or pre.js and include a flag indicating that that section can be used as a code sample.
Blocks: 810069
Hmm, actually, if the table of contents processing isn't too expensive, we could save an HTTP request by just rolling this into the env vars constructed in wiki/kumascript.py
Oh, but we'd still need it in the document JSON view, so you could get at it from other pages. Rolling it into env vars would only allow scripts to access it on the current page
No longer blocks: 810069
Blocks: 810069
No longer blocks: 810069
Whiteboard: feature request;
Whiteboard: feature request; → [type:feature]
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.