0

In blogdown's documentation, the end of D.8, it says,

This pair of comments is used to mark the HTML code fragment that should be moved to the <head> tag of the final HTML page. Typically this code fragment contains links to CSS and JavaScript files, e.g., those requested by the user via the css argument of html_page(), or automatically generated when HTML widgets are used in an Rmd document.

and

For method = 'html', this code fragment is not moved

Does this means the css argument of html_page() will lose effect when method = 'html'? What about CSS and JavaScript files of HTML widgets?

Yihui Xie
  • 28,913
  • 23
  • 193
  • 419
Zhuoer Dong
  • 629
  • 4
  • 11

1 Answers1

1

No. Because CSS (via the <style> or <link> tag) works in <body> in most browsers, even though it does not conform to HTML standards. See Using <style> tags in the <body> with other HTML. JavaScript also works in <body>. There is nothing for you to worry about. It would be a shame if HTML widgets do not work with blogdown.

The documentation in Appendix D.8 was outdated, and I just updated it.

Yihui Xie
  • 28,913
  • 23
  • 193
  • 419