typedoc2md / typedoc-plugin-markdown

A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.
https://typedoc-plugin-markdown.org
MIT License
714 stars 176 forks source link

Provide config boolean for using lowercase URLs #358

Closed lorensr closed 2 years ago

lorensr commented 2 years ago

Problem

With this plugin, if I click MyInterface, /package.MyInterface is in the next page's URL. If I reload, it works.

However, I'm using docsearch, and Algolia indexes normalize crawled pages by lowercasing URLs. So if I search for something, click it, I reach the page (via clientside routing). But then if I reload, I get a 404, because Vercel has case-sensitive URL->page mapping.

Solution

Add an option like lowercaseURLs that defaults to false.

lorensr commented 2 years ago

Going to take a stab at implementing this and submitting a PR ☺️

lorensr commented 2 years ago

Looked through the code and created an issue upstream: https://github.com/TypeStrong/typedoc/issues/2077

If that's implemented, then we can add a lowercase plugin option, which will be included in the bootstrap(app, options) call.

lorensr commented 2 years ago

Update: I was wrong about Algolia lowercasing URLs—I think there was an issue with my Crawler.