rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.74k stars 331 forks source link

blogdown's own website partially broken #680

Closed r2evans closed 2 years ago

r2evans commented 2 years ago

The blogdown website itself looks different in FF-95.0.2 (win11) based on the presence of a trailing /:

image

image

With the former, browser-console reports 404s on most but not all .js and .css. One such failure:

yihui commented 2 years ago

@r2evans Thanks for the report! I just updated the URL in DESCRIPTION.

@cderv I remember we fixed this issue long time ago (by automatically adding the trailing slash if not present)? I'm not sure why it's still a problem.

cderv commented 2 years ago

🤔 I should indeed be working. The feature has been put inside pkgdown now, and I switche the blogdown website to the new template recently that use the last pkgdown.

However there is a typo in here: https://github.com/rstudio/blogdown/blob/fb803c4078bd729104a25c976d1e149833c8a71a/_pkgdown.yml#L11 because there is a typo is the NEWS file https://pkgdown.r-lib.org/news/index.html#html-css-and-js-2-0-0

It should be trailing_slash_redirect https://github.com/r-lib/pkgdown/blob/dcec859cab08ff8852f5ee5ab09f3f57ec038805/R/build-home-index.R#L49

as in the doc https://pkgdown.r-lib.org/reference/build_site.html#template

I'll fix this.

I don't remember what, but it is possible the trailing slash in the URL field for DESCRIPTION are causing other issues 🤔

cderv commented 2 years ago

This is now fix and working correctly.

Thanks for the report @r2evans !

@yihui I have updated our template in quillt and also the other website that I already migrated. I did not revert the trailing slash addition in DESCRIPTION.

yihui commented 2 years ago

Okay, thanks!