typedoc-plugin-markdown icon indicating copy to clipboard operation
typedoc-plugin-markdown copied to clipboard

Provide config boolean for using lowercase URLs

Open lorensr opened this issue 3 years ago • 2 comments
trafficstars

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 avatar Oct 14 '22 03:10 lorensr

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

lorensr avatar Oct 14 '22 18:10 lorensr

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 avatar Oct 14 '22 19:10 lorensr

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

lorensr avatar Oct 15 '22 04:10 lorensr