Allow to specificy `stylesheet` as `script` with named attibutes in `htmlDependency()`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- Half a day
- Newbie friendliness
- 45/100
Research direction
Start in R/html_dependency.R around lines 502-509 and compare how htmlDependency() and renderDependencies() currently handle named attributes for scripts. Confirm how the stylesheet path is rendered, then make stylesheet attributes behave consistently with scripts, including data-external. Done means generated link tags preserve the supplied attributes.
Written by the indexing model from the issue text.
Description
Currently htmlDependency() allows to pass integrity SRI or any other attributes to script.
I wonder in continuation of https://github.com/rstudio/htmltools/issues/101 if we could add same logic for stylesheet.
This would allow renderDependencies() to generate a HTML with more than
<link href="path" rel="stylesheet" />
For example, I believe this would also allow to include HTML dependencies in R Markdown document output while adding data-external = 1 to indicated Pandoc should skip the link in self-contained operation. Currently, I don't think we can do it. This is the use case I have - I was just surprised it was not working the same as I can't add more attributes to the <link> tag and wondered why. 🤔
What about adding the same logic for stylesheets and scripts ?
- Dominant language
- R
- Stars
- 225
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rstudio/htmltools
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
-
Consider removing empty `.shiny-html-output` containers from document flow in fillable containers Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in rstudio/htmltools
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
r-lib/pkgdepends#485 · 3 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
beginners blocker
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enviPathR OpenBuild Error Build OK Build Warning policies-accepted pre-review precheck-passed
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Bioconductor/BiocContributions#207 · 6 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
datacarpentry/semester-biology#1255 ·