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

some bootswatch 3 themes fail for rmarkdown websites #1684

Closed
maxheld83 opened this issue Nov 3, 2019 · 4 comments
Closed

some bootswatch 3 themes fail for rmarkdown websites #1684

maxheld83 opened this issue Nov 3, 2019 · 4 comments

Comments

@maxheld83
Copy link
Contributor

maxheld83 commented Nov 3, 2019

I've just set up an rmarkdown website from the boilerplate that ships with RStudio 1.2.5013, just adding a different bootswatch theme:

_site.yml:

name: "my-website"
navbar:
  title: "My Website"
  left:
    - text: "Home"
      href: index.html
    - text: "About"
      href: about.html
output:
  html_document:
    theme: slate

(index.Rmd and about.Rmd are as in the boilerplate unchanged).

When running rmarkdown::render_site(), this fails with:

Error in navbarHeights[[theme]] : subscript out of bounds
Calls: <Anonymous> ... <Anonymous> -> overlay -> pandoc_body_padding_variable_args
Execution halted

Exited with status 1.

The problem seems to exist for themes:

  • slate
  • superhero.

cosmo and sandstone work.

Reproduces on another machine.
Discovered by @SvenNekula.


> devtools::session_info()
─ Session info ─────────────────────────────────────────────────
 setting  value                       
 version  R version 3.6.1 (2019-07-05)
 os       macOS Mojave 10.14.6        
 system   x86_64, darwin15.6.0        
 ui       RStudio                     
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       Europe/Berlin               
 date     2019-11-03                  

─ Packages ─────────────────────────────────────────────────────
 package     * version    date       lib
 assertthat    0.2.1      2019-03-21 [1]
 backports     1.1.5      2019-10-02 [1]
 callr         3.3.2      2019-09-22 [1]
 cli           1.1.0      2019-03-19 [1]
 crayon        1.3.4      2017-09-16 [1]
 desc          1.2.0      2018-05-01 [1]
 devtools      2.2.1      2019-09-24 [1]
 digest        0.6.22     2019-10-21 [1]
 ellipsis      0.3.0      2019-09-20 [1]
 evaluate      0.14       2019-05-28 [1]
 fs            1.3.1      2019-05-06 [1]
 glue          1.3.1      2019-03-12 [1]
 htmltools     0.4.0      2019-10-04 [1]
 knitr         1.25       2019-09-18 [1]
 magrittr      1.5        2014-11-22 [1]
 memoise       1.1.0      2017-04-21 [1]
 packrat       0.5.0      2018-11-14 [1]
 pkgbuild      1.0.6      2019-10-09 [1]
 pkgload       1.0.2      2018-10-29 [1]
 prettyunits   1.0.2      2015-07-13 [1]
 processx      3.4.1      2019-07-18 [1]
 ps            1.3.0      2018-12-21 [1]
 R6            2.4.0      2019-02-14 [1]
 Rcpp          1.0.2      2019-07-25 [1]
 remotes       2.1.0      2019-06-24 [1]
 rlang         0.4.1      2019-10-24 [1]
 rmarkdown     1.16       2019-10-01 [1]
 rprojroot     1.3-2      2018-01-03 [1]
 rstudioapi    0.10       2019-03-19 [1]
 sessioninfo   1.1.1      2018-11-05 [1]
 testthat      2.2.1      2019-07-25 [1]
 usethis       1.5.1.9000 2019-08-22 [1]
 withr         2.1.2      2018-03-15 [1]
 xfun          0.10       2019-10-01 [1]
 yaml          2.2.0      2018-07-25 [1]
 source                            
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.1)                    
 CRAN (R 3.6.1)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.1)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.1)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 Github (jimhester/usethis@b25c982)
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)                    
 CRAN (R 3.6.0)
@yihui
Copy link
Member

yihui commented Nov 18, 2019

These themes were not added to the rmarkdown package. Available ones are documented on the help page ?rmarkdown::html_document.

They will be added when #1688 is done, but I have no idea how long it will take...

@maxheld83
Copy link
Contributor Author

maxheld83 commented Nov 19, 2019

ah yes, sorry.

For future reference, ?rmarkdown::html_document:

Visual theme ("default", "cerulean", "journal", "flatly", "darkly", "readable", "spacelab", "united", "cosmo", "lumen", "paper", "sandstone", "simplex", or "yeti"). Pass NULL for no theme (in this case you can use the css parameter to add your own styles).

I was under the mistaken impression that all bootswatch 3.3.x themes were supported.

@yihui
Copy link
Member

yihui commented Nov 19, 2019

Perhaps we should just add these missing themes to avoid future confusion. If you could submit a PR, I'll be happy to review and merge it. Thanks!

@github-actions
Copy link

github-actions bot commented Nov 3, 2020

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants