`html_page()` 的`css` 参数是否与 blogdown 中的 `build_site(method = 'html')` 一起工作?

Does the `css` argument of `html_page()` work with `build_site(method = 'html')` in blogdown?

在 blogdown 的文档中,D.8 的结尾说,

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.

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

这是否意味着 html_page()css 参数在 method = 'html' 时将失效? HTML 个小部件的 CSS 和 JavaScript 文件呢?

没有。因为 CSS(通过 <style><link> 标签)在大多数浏览器中适用于 <body>,即使它不符合 HTML 标准。参见 Using <style> tags in the <body> with other HTML。 JavaScript 也适用于 <body>。您无需担心。如果 HTML 小部件不能与 blogdown.

一起使用,那将是一种耻辱

Appendix D.8中的文档已经过时,我刚刚更新了它。