Skip to content

<!-- {docsify-ignore} --> sometimes being ignored #1355

Closed

Description

@jesobreira

Bug Report

Steps to reproduce

Run the script with the following README.md:

# Heading 1

Test

## Heading 2

### Heading 3A

Lorem ipsum

#### Heading 4A <!-- {docsify-ignore} -->

##### Heading 5A

###### Heading 6A

Lorem ipsum

### Heading 3B

Lorem ipsum

#### Heading 4B <!-- {docsify-ignore} -->

##### Heading 5B

Lorem ipsum

index.html:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Test</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="description" content="Description">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css">
</head>
<body>
  <div id="app"></div>
  <script>
    window.$docsify = {
      name: '',
      repo: ''
    }
  </script>
  <script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
</body>
</html>

What is current behaviour

Heading 4A and its children get hidden, but Heading 4B doesn't.

What is the expected behaviour

Heading 4A and Heading 4B get hidden.

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: macOS Catalina

  • Node.js version: 12.18.3

  • npm/yarn version: 6.14.6

  • Browser version: Chrome Version 84.0.4147.135 (Official Build) (64-bit)

  • Docsify version: 4.11.6

  • Docsify plugins: none

Please create a reproducible sandbox

https://codesandbox.io/s/gallant-leaf-bz9n4

Mention the docsify version in which this bug was not present (if any)

Activity

  1. sy-records commented on Aug 26, 2020

    @sy-records
    Member

    You need to add configuration items.

    1. index.html
      window.$docsify = {
        loadSidebar: true,
        subMaxLevel: 6,
      };
    
    1. _sidebar.md
    - [README](README.md)
    
  2. jesobreira commented on Aug 26, 2020

    @jesobreira
    Author

    I'm not using a custom _sidebar.md, rather I'm trying to use the auto-generated table of contents. Does it make any difference?

  3. sy-records commented on Aug 27, 2020

    @sy-records
    Member

    The auto-generated one only supports ignoring one, any ideas? cc @docsifyjs/reviewers

  4. anikethsaha commented on Aug 27, 2020

    @anikethsaha
    Member

    It looks like a bug to me

  5. self-assigned this
    on Jul 25, 2025
  6. added this to the 5.x milestone on Jul 25, 2025
  7. added
    bugconfirmed as a bug
    and removed on Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugconfirmed as a bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions