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

Potential workaround for custom API TOC page #1

Closed
banchan86 opened this issue Jul 6, 2024 · 1 comment
Closed

Potential workaround for custom API TOC page #1

banchan86 opened this issue Jul 6, 2024 · 1 comment

Comments

@banchan86
Copy link

Hi @glopesdev @cjsha @bparks13 I learned something that may be helpful for you guys.

I stumbled upon this earlier when trying to replicate the TOC on the old Bonvision Docs but I had trouble getting it to stick as docfx will automatically generate the api/toc.yml file on build. I recently figured out how to do it and you can see a preview of this at https://banchan86.github.io/BonVision_env_dev/api_landing/api_landing.html.

What I found out was that you can point the API page to another folder with a custom toc.yml, and if you add api/toc.yml to the "build -> exclude" section of docfx.json, it will not use it to generate the sidebar TOC. It will still automatically generate api/toc.yml though so its still necessary to point the API navigation link to another folder.

"build": {
  "content": [
    {
      "files": [
        "**/*.{md,yml}"
      ],
      "exclude": [
        "_site/**",
        "filter.yml",
        "bonsai/**",
        "api/toc.yml"
      ]
}

Without this section in docfx.json, even though the custom API TOC page works at first, if you click on any of the operators its resets to the automatically generated TOC.

This may be another option to consider for you guys in addition to the one that I know @glopesdev was exploring over at dotnet/docfx#9998.

@banchan86
Copy link
Author

Closing this issue because its not relevant anymore due to bonsai-rx/docfx-tools#6

@banchan86 banchan86 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2024
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

No branches or pull requests

1 participant