Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Links in left side outline are incorrectly transformed to remove surrounding _ _ #11

Closed
crucialfelix opened this issue Oct 27, 2019 · 6 comments · Fixed by #21
Closed

Comments

@crucialfelix
Copy link

crucialfelix commented Oct 27, 2019

Building with:

lang ❯ typedoc --theme /Users/crucialfelix/.nvm/versions/node/v10.15.1/lib/node_modules/typedoc-neo-theme/bin/default

(globally installed neo-theme)

creates a front page:
file:///Users/crucialfelix/code/supercolliderjs/docs/packages/lang/docs/index.html

The generated source contains items in .tsd-navigation-primary that populate the sidebar:

<li class=" tsd-kind-external-module">
  <a href="modules/_sclang_.html" style="display:none">sclang</a>
</li>

These links are correct (but invisible). Each module is surrounded with _modulename_.html

But this is then rendered to the DOM (by frontend javascript AFAICT) as:

<a href="modules/sclang.html">sclang</a>

ie:
file:///Users/crucialfelix/code/supercolliderjs/docs/packages/lang/docs/modules/sclang.html

Without the surrounding underscores. Which is 404

@Fleker
Copy link
Contributor

Fleker commented Oct 29, 2019

Are you using a custom outline?

@crucialfelix
Copy link
Author

crucialfelix commented Oct 29, 2019

Nope. No settings at all really.

The repo is here: https://github.com/crucialfelix/supercolliderjs/tree/feature/docs

As I said in the issue: the generated html is correct. Some javascript seems to be replacing _module_.html with module.html

I didn't get a chance to investigate more.

Thanks

@Fleker
Copy link
Contributor

Fleker commented Oct 30, 2019

Seems to be happening here.

As clients typically use a custom outline, I suppose this issue hasn't really been noticed.

@rxliuli
Copy link
Contributor

rxliuli commented Dec 19, 2019

It's already December. Will this problem be fixed?

Fleker added a commit to Fleker/typedoc-neo-theme that referenced this issue Dec 20, 2019
Fixes google#11
Fixes google#16

Change-Id: Id134fbe04ba5941a67be308cf5015da0e4d6804b
@Fleker
Copy link
Contributor

Fleker commented Dec 20, 2019

This is being addressed in a pull request. Attached is an auto-generated package that you can use to try out right away.
a1250f0_typedoc-neo-theme-1.0.4.zip

@rxliuli
Copy link
Contributor

rxliuli commented Dec 21, 2019

After actual measurement, the above zip package still has some problems. I tried to modify some code and fixed this problem (I did not understand the compilation process of the entire theme)

Behavior of the above zip package

The link on the homepage sidebar is normal

image

Subpage

image

The part I modified (relative to node_modules/typedoc-neo-theme)

image

Compressed a modified

typedoc-neo-theme.zip

@Fleker Fleker closed this as completed in #21 Jan 8, 2020
Fleker pushed a commit that referenced this issue Jan 8, 2020
* Update the functions [renderSimpleHTMLRecursive] and [renderHTMLRecursive] in the TypeScript source code to fix the problem of automatic sidebar generation and regenerate main.js

Fixes #11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.