Skip to content

using the TOC in documentation.yml breaks the HTML for me #938

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

Closed
stevenalanstark opened this issue Oct 10, 2017 · 8 comments · Fixed by #1253
Closed

using the TOC in documentation.yml breaks the HTML for me #938

stevenalanstark opened this issue Oct 10, 2017 · 8 comments · Fixed by #1253

Comments

@stevenalanstark
Copy link

stevenalanstark commented Oct 10, 2017

Hello,

I am trying to setup the TOC with documentation.yml, however when I add an item to the TOC, it breaks. The item is organized and in the TOC, but the link breaks and there is no content output.

My setup is to tell documentation.js to generate HTML documentation for all the JS Source.

The JS Source is in ES6, exporting a default class with constants around the class. Like:

/**
 * FOO CONST
 * @type {string}
 */
const FOO = "test";

/**
 * Test Class
 */
export default class Test {
  
  constructor() {
  }

    /**
     * start
     * @param finishCB{Function} - called when the game has successfully been started
     */
    start( finishCB=null ) {
    }
}

I compile with a NPM command :

"scripts": {
    "documentation": "documentation build src/js/** -f html -o docs --config .documentation.yml",
}

if I include in the documentation.yml the following:

toc:
  - name: Testing TOC
    children:
      - Test
  - name: CONSTANTS
    children:
      - FOO

I can see both the Test class, and the FOO constant, on the left in the TOC, however the contents for each are not present in the output. Clicking the links do nothing. There are no errors in the console.

Is this a problem with my configuration? Maybe this type of TOC Configuration is not supported?

thank you.

@rhysforyou
Copy link

I'm seeing this same issue, though the Markdown output looks fine. See https://github.com/rpowelll/github-explore-react-demo/wiki/API-Docs

@onbjerg
Copy link

onbjerg commented Oct 21, 2017

Same here. Markdown works fine, but HTML puts children under "Static members" in the sidebar, but nothing is included in the contents and links are dead.

@Danielv123
Copy link

I am having the same issue as described by @onbjerg . This is only on documentation entries placed under

children:

@alexvicegrab
Copy link

I've managed to get something working-ish as per here, but the children bit is either broken or poorly documented (or both):
#803

@bitcrumb
Copy link

+1

Seeing the same, using the children property in documentation.yml doesn't render any content.

@madorb
Copy link

madorb commented Feb 15, 2018

Agreed, this is broken.

Using children for generates incorrect content, including nesting classes under "Static Members" and not generating valid links.

toc:
  - Sort
  - name: Classes
    description: "Some more classes"
    children:
      - Pageable

results in:

                <li><a
                  href='#classes'
                  class="h5 bold black caps toggle-sibling">
                  Classes
                  <span class='icon'>▸</span>
                </a>
                
                <div class='toggle-target display-none'>
                  
                  <ul class='list-reset py1-ul pl1'>
                    <li class='h5'><span>Static members</span></li>
                    
                      <li><a
                        href='#pageable'
                        class='regular pre-open'>
                        .Pageable
                      </a></li>
                    
                    </ul>
                  
                  
                  
                  
                </div>

@maylortaylor
Copy link

maylortaylor commented Jun 1, 2018

Can also confirm children does not work or is either badly documented.

@tmcw
Copy link
Member

tmcw commented Jun 1, 2018

Anyone interested in potentially digging in, to see where the bug is, and perhaps contributing a fix? The relevant code is in sort.js and the default theme: https://github.com/documentationjs/documentation/tree/master/src/default_theme .

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.

9 participants