Skip to content

Unable to add Table of Contents to docs #376

@agconti

Description

@agconti

When I build a markdown file containing the following information with, mkdocs build --clean, mkdocs throws: AttributeError: 'Markdown' object has no attribute 'toc'. Adding [TOC] like this was working before, but for some reason its throwing an exception now. I'm running version 0.11.1.

Markdown file:

For api overview and usages, check out [this page](overview.md).

[TOC]

Auth
=================================================

## Check if user is registered

`POST` `/auth/is_registered`

**paramaters**

- `email`

## Login

`POST` `/auth`

**Parameters**

- `email`
- `password`

**Response**

The response will be something like this:

Stack Trace:

Traceback (most recent call last):
"/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/Users/administrator/dev/meet-web/venv/lib/python2.7/site-packages/watchdog/observers/api.py", line 199, in run
    self.dispatch_events(self.event_queue, self.timeout)
  File "/Users/administrator/dev/meet-web/venv/lib/python2.7/site-packages/watchdog/observers/api.py", line 368, in dispatch_events
    handler.dispatch(event)
  File "/Users/administrator/dev/meet-web/venv/lib/python2.7/site-packages/watchdog/events.py", line 322, in dispatch
    self.on_any_event(event)
  File "/Users/administrator/dev/meet-web/venv/lib/python2.7/site-packages/mkdocs/serve.py", line 28, in on_any_event
    build(config, live_server=True)
  File "/Users/administrator/dev/meet-web/venv/lib/python2.7/site-packages/mkdocs/build.py", line 223, in build
    build_pages(config)
  File "/Users/administrator/dev/meet-web/venv/lib/python2.7/site-packages/mkdocs/build.py", line 170, in build_pages
    extensions=config['markdown_extensions'], strict=config['strict']
  File "/Users/administrator/dev/meet-web/venv/lib/python2.7/site-packages/mkdocs/build.py", line 36, in convert_markdown
    toc_html = md.toc
AttributeError: 'Markdown' object has no attribute 'toc'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions