kumascript: implement wiki.toc()

RESOLVED FIXED

Status

Mozilla Developer Network
Editing
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: lorchard, Unassigned)

Tracking

Details

(Reporter)

Description

6 years ago
In DekiScript, there's a `wiki.toc(path)` method that produces an HTML table of contents for a page:

http://developer.mindtouch.com/en/docs/DekiScript/Reference/Wiki_Functions_and_Variables/Wiki.Toc

This doesn't exist yet in KumaScript. To implement it, we need these things (which should be filed as blocker bugs of this one):

* Something like a $toc URL on a document that returns the bare HTML of the TOC for a page.

* A JS function in Template:Dekiscript:Wiki named toc(), which loads and returns the content of the $toc URL for a path.
(Reporter)

Comment 1

6 years ago
Here's an example template that needs this functionality:
https://developer-new.mozilla.org/en-US/docs/Template:JSGToC

And here's the page that uses the template:
https://developer-new.mozilla.org/en-US/docs/JavaScript/Guide

There should be an expanded ToC of sections within the guide
(Assignee)

Updated

5 years ago
Version: Kuma → unspecified
(Assignee)

Updated

5 years ago
Component: Docs Platform → Editing
Product: Mozilla Developer Network → Mozilla Developer Network
No longer blocks: 756266

Comment 2

5 years ago
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/17f28c9d625466300f174cb36734338817e7930d
fix bug 769516 - Add ?toc document option

https://github.com/mozilla/kuma/commit/543e665b16cbdbac0f0de95c4839042976041867
Merge pull request #811 from darkwing/kumascript-769516

fix bug 769516 - Add $toc document option

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.