Vuepress: [[toc]] renders empty with cutomization in config.js

Created on 19 Mar 2019  路  1Comment  路  Source: vuejs/vuepress




  • [x ] I confirm that this is an issue rather than a question.




Bug report

When I include the following configuration in the config.js file:

markdown: {
    toc: {
      includeLevel: [2]
    }
  }

The [[toc]] in my .md files renders empty, even though the page is full of <h2> headings:

<div class="table-of-contents"> <ul></ul> </div>

If I remove the extra configuration, it works fine, but renders both <h2> and <h3> (as expected, but not desired).

Version

1.0.0-alpha.44

Steps to reproduce

Repo: https://github.com/danrocha/tfa-vuepress

Add and remove the configuration above in config.js and check the rendered page, for example, http://localhost:8080/guides/dubai/#buildings (right below the map).

What is expected?

To have a Table of Contents with only <h2> level headings displayed.

What is actually happening?

The Table of Contents div renders empty.

Other relevant information

  • Your OS: macOS Mojave 10.14.3 (18D109)
  • Node.js version: 11.6.0
  • Browser version: Chrome Canary Version 75.0.3736.0 (Official Build) canary (64-bit)
  • Is this a global or local install? local
  • Which package manager did you use for the install? npm
  • Does this issue occur when all plugins are disabled? yes
bug

Most helpful comment

Sorry to hear that.

It's a known issue introduced by 1.0.0-alpha.41. I will fix it in several weeks.

>All comments

Sorry to hear that.

It's a known issue introduced by 1.0.0-alpha.41. I will fix it in several weeks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lesliecdubs picture lesliecdubs  路  3Comments

tinchox5 picture tinchox5  路  3Comments

sankincn picture sankincn  路  3Comments

genedronek picture genedronek  路  3Comments

ynnelson picture ynnelson  路  3Comments