r-lib / downlit

Syntax Highlighting and Automatic Linking
https://downlit.r-lib.org
Other
90 stars 22 forks source link

support pretty URL pages #182

Closed eitsupi closed 7 months ago

eitsupi commented 1 year ago

Many static site generators support the use of pretty URLs. Currently .html is assumed to come at the end of URL, but it would be great if we could specify / instead.

https://github.com/r-lib/downlit/blob/c0a8f645e21a03e258b7c1684901f84279cc706a/R/link.R#L213

For example, the reference pages of the polars package created by Mkdocs Material are pretty URLs, so downlit cannot create links to the reference pages. https://rpolars.github.io/reference/pl_pl/ https://github.com/pola-rs/r-polars/blob/67e6097b5d8395e32ee589a1dfd756138128c342/man/pl_pl.Rd

Perhaps pkgdown.yml needs to be extended to indicate if pretty URLs are used.

Related to r-lib/pkgdown#2173

hadley commented 7 months ago

Closing for the same reasons as the linked pkgdown issue.