telerik / docs-seed

Telerik Documentation Infrastructure
https://docs.telerik.com
Apache License 2.0
7 stars 21 forks source link

[SEO] Remove .html from generated in breadcrumbs and DocFX API navigation tree #254

Open pepinho24 opened 1 year ago

pepinho24 commented 1 year ago

Describe the bug Links generated in breadcrumbs and DocFX API navigation tree end with .html

To Reproduce Example: https://docs.telerik.com/blazor-ui/components/map/overview The light green are redirects: in the breadcrumb

image

Example: https://docs.telerik.com/devtools/wpf/api/telerik.windows.controls.raddocking - in the side tree and also internal

image

Expected behavior For SEO optimizations, the generated URLs should not end with .html

Additional context

pepinho24 commented 1 year ago

1) The breadcrumb issue could be fixed in the following line, where the url property should have the .html stripped: https://github.com/telerik/docs-seed/blob/master/_plugins/navigation.rb#L214 "<a href='#{baseurl}#{url.gsub(".html", "")}'>#{format_title(title)}</a>#{so_far}"

2) The API pages are generated by DocFX where we have little to no control. Ultimately, we might need to create a solution similar to the one stripping out the .html extension in the sitemap, discussed in https://github.com/telerik/docs-seed/issues/250

jivanova commented 1 year ago

@nikolay-nenkov @Mike4o

Could you please plan this with priority as it is related to the SEO of the docs site?

// side effect from https://github.com/telerik/docs-seed/issues/250