-
Notifications
You must be signed in to change notification settings - Fork 336
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
Document how to use a non-Google font #2461
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How I wish I could have read this before I had to use custom fonts 😺
|
||
Theming with bslib is powered by `bslib::bs_theme()` and the `bslib` field is a direct translation of the arguments to that function. | ||
As a result, you can fully specify a bslib theme using the `template.bslib` field, making it easy to share YAML with the `output.html_document.theme` field [of an R Markdown document](https://rstudio.github.io/bslib/articles/theming/index.html). | ||
* As a link to a style file, which you'll need to add to the `<head>` using this syntax: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* As a link to a style file, which you'll need to add to the `<head>` using this syntax: | |
* As a link to a style file that you might use for another website, which you'll need to add to the `<head>` using this syntax: |
would this be the use case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was inspired by https://cocktails.hadley.nz, which uses typography.com, which gives you a stylesheet that you need to put in the head. Given that I only have two examples of using non-Google webfonts and they're both totally different, I don't want to get too specific in this vignette.
vignettes/customise.Rmd
Outdated
``` | ||
|
||
When iterating on fonts, you'll need to run `build_home_index(); init_site()` then refresh you browwser to see the update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know these are pkgdown docs, not general font docs, but I wonder whether we could add a link about things such as https://chromewebstore.google.com/detail/cors-unblock/lfhmikememgdcahcdlaciloancbhjino Or maybe it's just a matter of linking to something about the web dev console from this vignette, as one could then see and google the error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a paragraph with some more general advice.
Co-authored-by: Maëlle Salmon <[email protected]>
Fixes #1968