Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: redirect traling slashes #281

Open
olivroy opened this issue May 22, 2024 · 4 comments
Open

FR: redirect traling slashes #281

olivroy opened this issue May 22, 2024 · 4 comments

Comments

@olivroy
Copy link
Contributor

olivroy commented May 22, 2024

For example, make this https://vincentarelbundock.github.io/tinytable/news/ a valid url.

https://vincentarelbundock.github.io/tinytable/NEWS works as expected.

I have a routine to check news on online doc. the first link works for pkgdown sites. I wondered if it were possible to make it work for altdoc sites.

@vincentarelbundock
Copy link
Collaborator

maybe the tinytable website has changed, but it looks like the address should be NEWS.html

Do you have another example?

Also, that might be a Quarto issue rather than altdoc...

@olivroy
Copy link
Contributor Author

olivroy commented May 28, 2024

Possibly, but also the fact that https://vincentarelbundock.github.io/tinytable/NEWS works but not https://vincentarelbundock.github.io/tinytable/news is a bit strange?

@vincentarelbundock
Copy link
Collaborator

yep, good point. But honestly, I'm not sure what altdoc can do about this. Case sensitivity of links seems like it would be in scope for Quarto itself. Can I change anything in the _quarto.yml to force Quarto to disregard upper cases? I have no idea...

@olivroy
Copy link
Contributor Author

olivroy commented Jun 7, 2024

Not sure. quarto-dev/quarto-cli#6848 is opened about case sensitiviry. in pkgdown, there is build_redirects(). i wonder if quarto has something like this...

Oh, it does

The news file generated by alt doc could have this in header

https://quarto.org/docs/websites/website-navigation.html#redirects

---
aliases:
  - news.html
---

Same thing for other pages, so that url created in altdoc map almost exactly with how pkgdown structures things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants