docfx icon indicating copy to clipboard operation
docfx copied to clipboard

[Bug] globalNamespaceID specified, but not generated in the toc data of _site/api/index.html

Open SONIC3D opened this issue 1 year ago • 5 comments

Version docfx-win-x64-v2.71.1(May also apply to other version)

Describe the bug Specify the following metadata settings:

"globalNamespaceId": "Global"
"dest": "api"

In the api directory, classed in global namespace generated correct yaml in "Global." prefix. But when I browse the result site, the TOC shows no "Global" tree node. If I type any class name in global namespace into the TOC filter text box, a tree node with no name will be displayed as the parent node of my filtered class.

Look into the html output files in directory "_site", the The name attribute and the display text of this node is empty in "api/index,html" and "api/toc,html". And for the toc.json, it shows null for its name.

SONIC3D avatar Nov 23 '23 08:11 SONIC3D

We are seeing this too (DocFX 2.70.0).

jo3w4rd avatar Jan 23 '24 17:01 jo3w4rd

Just wanted to add that I'm seeing this too, on docfx 2.61.0. What seems to be happening, is that docs/api/toc.yml is being generated as follows:

- uid: Global
  name: ''
  items:
  - ...
- uid: Other.Namespace
   name: 'Other.Namespace'
   items:
   - ...

When the actual website is generated from this .yml file, the associated .html file doesn't have the correct name for the Global namespace:

<div class="sidetoc">
      <div class="toc" id="toc">

          <ul class="nav level1">
                <li>
                    <span class="expand-stub"></span>
                    <a href="Global.html" name="" title=""></a>

Note that the last line there should be <a href="Global.html" name="" title="Global">Global</a>.

nickfourtimes avatar Jan 30 '24 20:01 nickfourtimes