Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeating sections when using .md files #1113

Closed
ziguro opened this issue Jul 30, 2018 · 2 comments · Fixed by #1206
Closed

Repeating sections when using .md files #1113

ziguro opened this issue Jul 30, 2018 · 2 comments · Fixed by #1206

Comments

@ziguro
Copy link

ziguro commented Jul 30, 2018

Hi,

I am just starting with documentation.js version 8.0.2 on Windows 10 Pro. (Node version is 8.11.3)
Issue is repeating sections when I use md files. To reproduce, you can try these steps.

  1. Create a folder "Test".
  2. Cd into "Test"
  3. Created a folder "src"
  4. Cd into "src" and create a file "intro.md"
  5. Type "Hello World!" in intro.md
  6. Cd out of "src" and create a config file "documentation.yml"
  7. Typed below:
toc:
  - name: Introduction
    file: src/intro.md
  1. Build doc with this paramerters in Windows cmd terminal.
>documentation build --format html --output docs --config documentation.yml src\*

When I open "docs\index.html" in Chrome, I see "Introduction" section repeating twice as shown here.

Resulting file structure is like this.

|-Test
   |- docs
      |- assets
      |- index.html
   |- src
      |- intro.md
   |- documentation.yml

Any help to prevent this would be appreciated.
Thanks.

Test.zip

@sto3psl
Copy link

sto3psl commented Aug 15, 2018

I have the same issue with the following configurations:

toc:
  - name: Library name
    file: Readme.md

# or with description

toc:
  - name: Library name
    description: |
      This is my description

The output will look like that

screen shot 2018-08-15 at 08 42 27

As soon as I add children I get only 1 section in the html. But it's only a less optimal workaround.

toc:
  - name: Library name
    description: |
      This is my description
    children:
      - Options

screen shot 2018-08-15 at 08 44 53

Otherwise great project you have here 👍.

Edit:

I just checked with version 8.0.0 and there it works fine.

@calrsom
Copy link

calrsom commented Oct 29, 2018

I am also seeing this issue with HTML output and sections without children.

tmcw pushed a commit that referenced this issue Feb 22, 2019
…1206)

* fix(default theme): only render either note or section

Fixes notes also showing up as duplicate sections.

fix #1113

* undo revertion of c5f32ae

* update test snapshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants