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

Fontawesome icons not showing in bs4_book #1474

Open
bwu62 opened this issue Aug 16, 2024 · 8 comments
Open

Fontawesome icons not showing in bs4_book #1474

bwu62 opened this issue Aug 16, 2024 · 8 comments
Labels
bs4_book 🥾 bug an unexpected problem or unintended behavior

Comments

@bwu62
Copy link
Contributor

bwu62 commented Aug 16, 2024

Hey, apologies if this isn't the most relevant or informative issue report, but sometime in the past week or two it seems like some underlying style or script file used in bs4_book changed?

I'm pretty sure it's some underlying file because 3 months ago I copied the default bs4_book template and published it on a Github pages here mostly for personal use as convenient bs4_book documentation, and haven't modified it since, and it suddenly changed when I came back from a 2 week break to work on another bs4_book project.

I'm sure there are other changes, but the most significant that I noticed were the following:

  • It seems like heading anchors are now broken. This was easy enough to hack back into my own project using AnchorJs and a bit of hacky jquery. It's inelegant but I can share if there's interest.
  • In mobile (narrowest width) view, the TOC show/collapse button has changed styles. It no longer has several lines inside and is now just an oblong box that fills with the primary color when clicked.

I poked around the source code and developer console but couldn't figure out where the change traces to. Any help figuring out what changed and maybe how to revert it would be appreciated, thanks! :)

Edit: I checked a bunch of other bs4_books published online, including all the bookdown reference example books. All the anchor links there are broken too, in both Chrome and Firefox so I don't think it's a browser-side issue. Notably, some of the gitbook anchors still work so I think the issue is specific to something in the bs4_book template.

@cderv
Copy link
Collaborator

cderv commented Aug 26, 2024

Thanks a lot for the heads up.

We did not change anything in bookdown directly AFAIK. Though it could be related to

  • Either a pandoc update.
  • Either a bslib R package update.

I'll try to trace this anchor link breakage.

And also the mobile view if I can reproduce

@cderv cderv added bs4_book 🥾 bug an unexpected problem or unintended behavior labels Aug 26, 2024
@cderv
Copy link
Collaborator

cderv commented Aug 26, 2024

It seems to be the fontawesome icons not showing 🤔

@cderv cderv changed the title bs4_book style suddenly changed? Fontawesome icons not showing in bs4_book Aug 26, 2024
@cderv
Copy link
Collaborator

cderv commented Aug 26, 2024

image

The fontawesome JS kit is not loading anymore : 403 error.

<script src="https://kit.fontawesome.com/6ecbd6c532.js" crossorigin="anonymous"></script>

@hadley do you know about this url you used for bs4_book()?

Should we maybe update to another method to not use this js kit and the fontawesome package maybe ?
What do you use in pkgdown ?

@hadley
Copy link
Member

hadley commented Aug 26, 2024

No idea sorry. These days I'd recommend folks switch to quarto book.

@bwu62
Copy link
Contributor Author

bwu62 commented Sep 3, 2024

Oh looks like it's back up and working again. Wondering if we should consider a different CDN for the fontawesome JS kit?

@hadley
Copy link
Member

hadley commented Sep 3, 2024

I think you should consider bookdown to be largely superseded by quarto books.

@bwu62
Copy link
Contributor Author

bwu62 commented Sep 3, 2024

@hadley I understand quarto is the latest and greatest. However, currently I don't have time to overhaul my project and make the switch. Plus, I was under the impression from the Quarto FAQ page that R Markdown and bookdown have not yet been superseded and will continue to receive bug fixes. I think switching out the link for a better CDN may be an easy fix to significantly improve bookdown's stability for existing users.

@hadley
Copy link
Member

hadley commented Sep 4, 2024

I just realised that this is probably why I keep getting these emails:

Screenshot 2024-09-04 at 12 06 14

So yes, probably worth fixing by switching to the fontawesome package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bs4_book 🥾 bug an unexpected problem or unintended behavior
Projects
Status: Next / Ready for Dev
Development

No branches or pull requests

3 participants