site_libs keeps tracking changes of fonts

I am doing a Rmarkdown website, but the folder site_libs keep tracking font types. Is this an expected behavior?

What is a RMarkdown website? Which tools/packages do you use besides RMarkdown?

I am using only Rmarkdown. I guess many people call this Rmarkdown websites. You need to create a _site.yml and an index.Rmd files, but also create a site_libs folder.

1 Like

Two approaches:

  • start with a minimal example and extend till you get problems
  • make a copy of your site and simplify

No other advice. Apparently it is not a problem familiar to the forum participants.

Thank you very much. I agree with you, is not a common problem, there was a post with a similar problem in 2018.

Could you please expand on what you mean by "tracking font types"? The site_libs/ directory contains all the supporting website files (e.g. CSS, JS) that are used by the Rmd-generated HTML files.

That very frequently is it showing me untracked files like the picture attached. I am not changing anything related to fonts.

Thanks for the clarification. I'm not exactly sure why those particular files are showing up as new files. Did you recently upgrade the rmarkdown package? Every time you run render_site(), the site_libs/ directory is deleted and re-created. The reproducible example below shows that those font files are included by default, so I would have expected them to already be committed in your repository:

directory <- tempfile()
dir.create(directory)
yaml <- file.path(directory, "_site.yml")
writeLines("output_dir: \"docs\"", con = yaml)
index <- file.path(directory, "index.Rmd")
file.create(index)
#> [1] TRUE
rmarkdown::render_site(directory, quiet = TRUE)
list.files(file.path(directory, "docs", "site_libs", "bootstrap-3.3.5", "css", "fonts"))
#>  [1] "Lato.ttf"                "LatoBold.ttf"           
#>  [3] "LatoItalic.ttf"          "NewsCycle.ttf"          
#>  [5] "NewsCycleBold.ttf"       "OpenSans.ttf"           
#>  [7] "OpenSansBold.ttf"        "OpenSansBoldItalic.ttf" 
#>  [9] "OpenSansItalic.ttf"      "OpenSansLight.ttf"      
#> [11] "OpenSansLightItalic.ttf" "Raleway.ttf"            
#> [13] "RalewayBold.ttf"         "Roboto.ttf"             
#> [15] "RobotoBold.ttf"          "RobotoLight.ttf"        
#> [17] "RobotoMedium.ttf"        "SourceSansPro.ttf"      
#> [19] "SourceSansProBold.ttf"   "SourceSansProItalic.ttf"
#> [21] "SourceSansProLight.ttf"  "Ubuntu.ttf"

Created on 2020-05-23 by the reprex package (v0.3.0)

Session info
devtools::session_info()
#> - Session info ---------------------------------------------------------------
#>  setting  value                       
#>  version  R version 4.0.0 (2020-04-24)
#>  os       Windows 10 x64              
#>  system   x86_64, mingw32             
#>  ui       RTerm                       
#>  language (EN)                        
#>  collate  English_United States.1252  
#>  ctype    English_United States.1252  
#>  tz       America/New_York            
#>  date     2020-05-23                  
#> 
#> - Packages -------------------------------------------------------------------
#>  package     * version    date       lib source                              
#>  assertthat    0.2.1      2019-03-21 [1] CRAN (R 4.0.0)                      
#>  backports     1.1.6      2020-04-05 [1] CRAN (R 4.0.0)                      
#>  callr         3.4.3      2020-03-28 [1] CRAN (R 4.0.0)                      
#>  cli           2.0.2      2020-02-28 [1] CRAN (R 4.0.0)                      
#>  crayon        1.3.4      2017-09-16 [1] CRAN (R 4.0.0)                      
#>  desc          1.2.0      2018-05-01 [1] CRAN (R 4.0.0)                      
#>  devtools      2.3.0      2020-04-10 [1] CRAN (R 4.0.0)                      
#>  digest        0.6.25     2020-02-23 [1] CRAN (R 4.0.0)                      
#>  ellipsis      0.3.0      2019-09-20 [1] CRAN (R 4.0.0)                      
#>  evaluate      0.14       2019-05-28 [1] CRAN (R 4.0.0)                      
#>  fansi         0.4.1      2020-01-08 [1] CRAN (R 4.0.0)                      
#>  fs            1.4.1      2020-04-04 [1] CRAN (R 4.0.0)                      
#>  glue          1.4.0      2020-04-03 [1] CRAN (R 4.0.0)                      
#>  highr         0.8        2019-03-20 [1] CRAN (R 4.0.0)                      
#>  htmltools     0.4.0.9003 2020-05-02 [1] Github (rstudio/htmltools@984b39c)  
#>  knitr         1.28       2020-02-06 [1] CRAN (R 4.0.0)                      
#>  magrittr      1.5        2014-11-22 [1] CRAN (R 4.0.0)                      
#>  memoise       1.1.0      2017-04-21 [1] CRAN (R 4.0.0)                      
#>  pkgbuild      1.0.7      2020-04-25 [1] CRAN (R 4.0.0)                      
#>  pkgload       1.0.2      2018-10-29 [1] CRAN (R 4.0.0)                      
#>  prettyunits   1.1.1      2020-01-24 [1] CRAN (R 4.0.0)                      
#>  processx      3.4.2      2020-02-09 [1] CRAN (R 4.0.0)                      
#>  ps            1.3.3      2020-05-08 [1] CRAN (R 4.0.0)                      
#>  R6            2.4.1      2019-11-12 [1] CRAN (R 4.0.0)                      
#>  remotes       2.1.1      2020-02-15 [1] CRAN (R 4.0.0)                      
#>  rlang         0.4.6      2020-05-02 [1] CRAN (R 4.0.0)                      
#>  rmarkdown     2.2.0      2020-05-02 [1] Github (cpsievert/rmarkdown@310fbeb)
#>  rprojroot     1.3-2      2018-01-03 [1] CRAN (R 4.0.0)                      
#>  sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 4.0.0)                      
#>  stringi       1.4.6      2020-02-17 [1] CRAN (R 4.0.0)                      
#>  stringr       1.4.0      2019-02-10 [1] CRAN (R 4.0.0)                      
#>  testthat      2.3.2      2020-03-02 [1] CRAN (R 4.0.0)                      
#>  usethis       1.6.0      2020-04-09 [1] CRAN (R 4.0.0)                      
#>  withr         2.2.0      2020-04-20 [1] CRAN (R 4.0.0)                      
#>  xfun          0.13       2020-04-13 [1] CRAN (R 4.0.0)                      
#>  yaml          2.2.1      2020-02-01 [1] CRAN (R 4.0.0)                      
#> 
#> [1] C:/Users/john/Documents/R/win-library/4.0
#> [2] C:/Program Files/R/R-4.0.0/library

I always commit everything in site_libs/ in order to keep the website functioning. Thus I'd also recommend you commit everything in site_libs/, even if it seems unnecessary.

Thank you very much John.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.