docfx icon indicating copy to clipboard operation
docfx copied to clipboard

Lowercase URLs for API reference

Open gix opened this issue 8 years ago • 3 comments

Currently generated API docs use the name of types for URLs including uppercase letters which looks out of place. Would it be possible to add an option to automatically convert these to lowercase, similar to MSDN and docs.microsoft.com?

It may already be possible by explicitly overriding each metadata entry since you can set the api-id there but that seems like a lot of unnecessary work if that feature isn't used otherwise.

gix avatar Aug 18 '17 03:08 gix

Is there any update on this? I've been scouring the docfx documentation for the last 30 mins in hopes of finding a way to force all the links to be lowercase, but came up empty-handed.

I'm still new to using docfx so I'm not really sure how involved it'd be to explicitly override the metadata entries as mentioned above, but it doesn't exactly sound simple 😅

tom-weiland avatar Sep 21 '22 23:09 tom-weiland

@tom-weiland Can you illustrate this issue? I just tested with Links [XmlDocument](xref:System.Xml.XmlDocument) and got <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.xmldocument">XmlDocument</a>

Update: Is the issue with the local references? For instance, I used Info about [A](xref:XRefDemo.A) and gets <a class="xref" href="XRefDemo.A.html">A</a>.

In this case, XRefDemo.A.html is the actual name of the HTML file, so that might be the reason.

paulushub avatar Sep 22 '22 05:09 paulushub

I just tested with Links [XmlDocument](xref:System.Xml.XmlDocument) and got <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.xml.xmldocument">XmlDocument</a>

I'm assuming you got a lowercase link because Microsoft's documentation links are all lowercase, which is presumably because all of their file names are lowercase.

What I'm looking for is a way to make docfx generate all the API files with lowercase filenames—I want documentation for class Foo in namespace SomeNamespace to end up in somenamespace.foo.html instead of SomeNamespace.Foo.html. Right now all of my site's links are capitalized like the latter.

tom-weiland avatar Sep 22 '22 09:09 tom-weiland