DiFuks / typedoc-theme-hierarchy

Hierarchy theme for typedoc
MIT License
18 stars 5 forks source link

Local paths included in hierarchy. #21

Closed Owen3H closed 1 year ago

Owen3H commented 1 year ago

Currently the hierarchy root is resolved to a path on my local machine.

Instead, it should default to the project root. However, if "basePath" is specified within typedoc.json it should use that as the root.

image

DiFuks commented 1 year ago

fixed v4.0.1

orangebokov commented 12 months ago

Thanks, great theme! But, unfortunately, the same problem... Mac os m1, v4.1.2

Снимок экрана 2023-10-30 в 22 38 36

I solved this problem for myself as follows:

navigation.js

const navigation = (context) => (props) => {
let categories = formatFileHierarchy(props.model.project.children || []);

do {
    var key = Object.keys(categories.categories)[0]
    categories = categories.categories[key]
}
while (key != "front")

thereby removing the unnecessary branch above "front"

Снимок экрана 2023-10-30 в 22 48 59
orangebokov commented 12 months ago

Just checked

Apparently this is because entryPoints is set in relative in my configuration

"entryPoints": ["../../front/"],
orangebokov commented 12 months ago

in fact, even if I do

{
  "entryPoints": ["src"],
  "entryPointStrategy": "Expand",
  "out": "public/docs",
  "plugin": ["typedoc-theme-hierarchy"],
  "theme": "hierarchy",
  "tsconfig": "./tsconfig.json",
  "name": "Project name"
}

it will still capture the "src" folder

Снимок экрана 2023-10-30 в 23 45 29