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

Include custom CSS after learnr html dependencies #574

Merged
merged 2 commits into from
Aug 24, 2021

Conversation

gadenbuie
Copy link
Member

Due to the changes in rstudio/rmarkdown#2064, the HTML dependencies for learnr tutorials are now being added just before the closing <head> tag. This is generally a good thing, but these dependencies are inserted between custom CSS links and the closing head tag, causing the default CSS rules to be applied over the custom rules rather than the other way around.

This PR uses the new <!-- HEAD_CONTENT --> placeholder to ensure that the default dependencies appear before customm CSS.

Originally reported on RStudio Community: learnr style appears to be broken on re-publish - shiny - RStudio Community

@gadenbuie gadenbuie merged commit c7a71dd into master Aug 24, 2021
@gadenbuie gadenbuie deleted the tutorial-format-head-content branch August 24, 2021 14:06
@antshi
Copy link

antshi commented Nov 29, 2021

so, a workaround is to add the custom html and css after your header with

htmltools::includeHTML("css/my_html.html")
htmltools::includeCSS("css/my_style.css")

But, this is just a temporary workaround on my side.
Otherwise, yes, to the owners: please, update learnr to be compatible with the new rmarkdown?

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

Successfully merging this pull request may close these issues.

None yet

2 participants