milesj / docusaurus-plugin-typedoc-api

Docusaurus plugin that provides source code API documentation powered by TypeDoc.
71 stars 26 forks source link

Changelog double heading #70

Open B4nan opened 2 years ago

B4nan commented 2 years ago

The h1 heading in changelog is rendered twice. I believe you are removing it dynamically somehow, as with different site it works, but for https://crawlee.dev/ it does not. I was working this around by hiding the element via css based on its ID, but with the recent update, that h1 element no longer has an ID.

https://crawlee.dev/api/core/changelog https://github.com/apify/crawlee/tree/master/website

Note we have only one root changelog, that is symlinked to the packages/core folder.

https://github.com/apify/crawlee/blob/master/CHANGELOG.md

I also tried to manually add the ID to the h1 element, no luck there, it seems like the markdown processor removes it all the time.

milesj commented 2 years ago

This is where it gets removed: https://github.com/milesj/docusaurus-plugin-typedoc-api/blob/master/packages/plugin/src/markdownLoader.ts#L7

Maybe it's not working anymore 🤔

B4nan commented 2 years ago

Looks like that method is actually never called, tried to add some logging inside but nothing gets printed.

milesj commented 2 years ago

It gets loaded here: https://github.com/milesj/docusaurus-plugin-typedoc-api/blob/master/packages/plugin/src/index.ts#L391

Did docusaurus change their webpack logic again...

B4nan commented 2 years ago

CSS workaround I am currently using:

.apiItemContainer .tsd-readme h1:first-child {
    display: none;
}
milesj commented 2 years ago

So I've tried to reproduce this with no luck. It's working correctly on my end.