bootstrap-theme icon indicating copy to clipboard operation
bootstrap-theme copied to clipboard

How to integrate with Quarto Website pages?

Open CeresBarros opened this issue 1 year ago • 0 comments

I am trying to apply the BC Gov bootstrap theme to a Quarto Website (https://github.com/bcgov/FFEC-website), but am having trouble knowing how to do so.

Quarto documentation suggests that to use a custom theme one simply needs to pass the .scss file (see https://quarto.org/docs/output-formats/html-themes.html#custom-themes). However, the .scss files available in bcgov/bootstrap-theme/dist/scss do not conform with the type of content expected by quarto:

ERROR: The file C:\Users\cbarros\GitHub\BCGov\FFEC-website\scss\bootstrap-theme.scss doesn't contain at least one layer boundary (/*-- scss:defaults --*/, /*-- scss:rules --*/, /*-- scss:mixins --*/, /*-- scss:functions --*/, or /*-- scss:uses --*/)

Error: The file C:\Users\cbarros\GitHub\BCGov\FFEC-website\scss\bootstrap-theme.scss doesn't contain at least one layer boundary (/*-- scss:defaults --*/, /*-- scss:rules --*/, /*-- scss:mixins --*/, /*-- scss:functions --*/, or /*-- scss:uses --*/)
    at sassLayerStr (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:59999:15)
    at sassLayerFile (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:59995:12)
    at sassLayer (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:59982:16)
    at file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:122917:24
    at Array.flatMap (<anonymous>)
    at layerTheme (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:122900:27)
    at resolveThemeLayer (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:123042:31)
    at resolveBootstrapScss (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:122892:55)
    at boostrapExtras (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:124434:25)
    at themeFormatExtras (file:///C:/Program%20Files/RStudio/resources/app/bin/quarto/bin/quarto.js:125956:16)

Also, Quarto websites do not use (at least by default) with a package.json file, so I'm not sure how to follow the instructions to install this bootstrap theme either.

Any help is much appreciated! Ceres

CeresBarros avatar Jan 24 '24 01:01 CeresBarros