r-lib / pkgdown

Generate static html documentation for an R package
https://pkgdown.r-lib.org/
Other
718 stars 335 forks source link

extras.css not being added to index.html after building site locally #940

Closed sdhutchins closed 5 years ago

sdhutchins commented 5 years ago

Issue

I have added an extras.css to a pkgdown directory in my package directory, but when running pkgdown::build_site(), it doesn't add extras.css to the index.html. However, it does copy that file to the docs folder.

cc: @grabear

@import url("https://fonts.googleapis.com/css?family=Quicksand");
@import url("https://cdn.rawgit.com/tonsky/FiraCode/1.205/distr/fira_code.css");

body {
  font-family: "Quicksand", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  font-family: "Quicksand", "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
}

pre, code {
  font-family: "Fira Code", Consolas, Inconsolata, monospace;
}

.navbar-default {
  background-color: #1B243C;
  border-color: #1B243C;
  color: #fff;
}

.label-danger {
    background-color: #3E7BAA;
}

.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:hover, .navbar-default .navbar-nav>.active>a:focus {
    color: #ffffff;
    background-color: #273457;
}

Session Info

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] Biobase_2.42.0        httr_1.4.0            pkgload_1.0.2         splines_3.5.1         jsonlite_1.6          foreach_1.4.4        
 [7] MicrobiomeR_0.0.1     assertthat_0.2.0      stats4_3.5.1          phyloseq_1.25.2       yaml_2.2.0            remotes_2.0.2        
[13] sessioninfo_1.1.1     pillar_1.3.1          backports_1.1.3       lattice_0.20-35       glue_1.3.0            digest_0.6.18        
[19] XVector_0.22.0        colorspace_1.3-2      htmltools_0.3.6       Matrix_1.2-14         plyr_1.8.4            pkgconfig_2.0.2      
[25] devtools_2.0.1        zlibbioc_1.28.0       purrr_0.2.5           scales_1.0.0          processx_3.2.1        tibble_1.4.2         
[31] mgcv_1.8-24           ggplot2_3.1.0         IRanges_2.16.0        usethis_1.4.0         withr_2.1.2           lazyeval_0.2.1       
[37] BiocGenerics_0.28.0   cli_1.0.1             survival_2.42-3       magrittr_1.5          crayon_1.3.4          memoise_1.1.0        
[43] evaluate_0.12         ps_1.2.1              fs_1.2.6              nlme_3.1-137          MASS_7.3-50           xml2_1.2.0           
[49] vegan_2.5-3           pkgbuild_1.0.2        tools_3.5.1           data.table_1.11.8     prettyunits_1.0.2     stringr_1.3.1        
[55] Rhdf5lib_1.4.1        S4Vectors_0.20.1      munsell_0.5.0         cluster_2.0.7-1       bindrcpp_0.2.2        callr_3.1.0          
[61] packrat_0.5.0         Biostrings_2.50.1     ade4_1.7-13           compiler_3.5.1        pkgdown_1.3.0.9000    rlang_0.3.0.1        
[67] rhdf5_2.26.0          grid_3.5.1            iterators_1.0.10      biomformat_1.10.0     rstudioapi_0.8.0.9000 igraph_1.2.2         
[73] rmarkdown_1.11        testthat_2.0.1        multtest_2.38.0       gtable_0.2.0          codetools_0.2-15      roxygen2_6.1.1       
[79] curl_3.2              rematch2_2.0.1        reshape2_1.4.3        R6_2.3.0              knitr_1.21            dplyr_0.7.8          
[85] bindr_0.1.1           commonmark_1.7        rprojroot_1.3-2       permute_0.9-4         desc_1.2.0            ape_5.2              
[91] stringi_1.2.4         parallel_3.5.1        Rcpp_1.0.0            tidyselect_0.2.5      xfun_0.4 
jayhesselberth commented 5 years ago

Is your package on github?

sdhutchins commented 5 years ago

Is your package on github?

@jayhesselberth Yes, it is. The branch in question is https://github.com/vallenderlab/MicrobiomeR/tree/test

jayhesselberth commented 5 years ago

The files should be named extra.css not extras.css (same for js file).

sdhutchins commented 5 years ago

The files should be named extra.css not extras.css (same for js file).

haha thank you. I think it's pretty clear that my sleep deprivation is showing!