Dynalon/mdwiki — pull request #65 by curtismitchell (2013-12-09 16:39:18+00:00)
Title: H3 navigation

# Configurable Page Menu

This change modifies the config.json schema:
- Removed the `useSideMenu` option
- Removed the `tocAnchor` option
- Added a `pageMenu` option with the following properties: disable, useHeadings, returnAnchor

`$.md.config.pageMenu.disable` replaces `useSideMenu` and `$.md.config.pageMenu.returnAnchor` replaces `tocAnchor`.

`$.md.config.pageMenu.useHeadings` is a comma-delimited list of headings that should be used in the page menu and the jump links e.g. `h2,h3`.

An example `config.json`:

```json
{
"lineBreaks": "gfm",
"additionalFooterText": "",
"anchorCharacter": "#",
"pageMenu": {
"disable": false,
"returnAnchor": "[top]",
"useHeadings": "h1,h2,h3,h4"
}
}
```

I have a few commits in there because I attempted to nest the page menu. I realized that may not be a good idea so I manually reverted a few of those changes. However, each menu item does have a class included that references the heading level e.g. `h2-nav` for `H2` headings and `h3-nav` for `H3` headings, etc.