r-lib / pkgdown

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

index.html renders locally but github pages does not show article or images #2087

Closed MattPM closed 2 years ago

MattPM commented 2 years ago

Hi pkgdown team! My site is rendering perfectly on the index.html, but I'm having issues with the rendering on github pages. The page appears, but one out of the two articles (the first in the nav bar drop down) shows a 404 error on the github pages deployment. I can't track down a difference in the structure of the two files. Also curiously, I do not see images that are in man/figures/ online (two images one in the article and one on the readme), however those are shown in the html rendering preview, as well as on the github readme. I'm wondering if these issues might be related.

This is the link to the github pages site: https://mattpm.net/scglmmr/ This is the link to the github repository: https://github.com/MattPM/scglmmr

The actual html in the (read only) index.html file the articles look to be referenced correctly:

<li class="dropdown">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
    Articles

    <span class="caret"></span>
  </a>
  <ul class="dropdown-menu" role="menu">
<li>
      <a href="articles/pseudobulk_mixed_effects.html">Pseudobulk differential expression with nested group repeated measures single cell experiment designs</a>
    </li>
    <li>
      <a href="articles/scglmmr_singlecell.html">Single cell gene and module differential expression with nested group repeated measures experiment designs</a>
    </li>
  </ul>
</li>

My _pkgdown.yml:

url: https://mattpm.net/scglmmr/
destination: docs

The /docs/pkgdown.yml file:

pandoc: '2.18'
pkgdown: 2.0.3
pkgdown_sha: ~
articles:
  pseudobulk_mixed_effects: pseudobulk_mixed_effects.html
  scglmmr_singlecell: scglmmr_singlecell.html
last_built: 2022-05-10T18:07Z
urls:
  reference: https://mattpm.net/scglmmr/reference
  article: https://mattpm.net/scglmmr/articles

Thanks very much for any assistance anyone might be able to provide!

-Matt

Output of sessionInfo() :

R version 4.0.5 Patched (2021-03-31 r80136) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Mojave 10.14.6

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages: [1] pkgdown_2.0.3

loaded via a namespace (and not attached): [1] tidyselect_1.1.0 lme4_1.1-26 RSQLite_2.2.7 AnnotationDbi_1.52.0 grid_4.0.5
[6] BiocParallel_1.24.1 scatterpie_0.1.7 munsell_0.5.0 codetools_0.2-18 statmod_1.4.35
[11] withr_2.4.3 colorspace_2.0-0 GOSemSim_2.16.1 Biobase_2.50.0 knitr_1.31
[16] rstudioapi_0.13 stats4_4.0.5 ggsignif_0.6.0 DOSE_3.16.0 gitcreds_0.1.1
[21] Rdpack_2.1.1 MatrixGenerics_1.2.1 emmeans_1.5.4 GenomeInfoDbData_1.2.4 polyclip_1.10-0
[26] pheatmap_1.0.12 bit64_4.0.5 farver_2.0.3 rprojroot_2.0.2 downloader_0.4
[31] coda_0.19-4 vctrs_0.4.1 generics_0.1.2 TH.data_1.0-10 xfun_0.30
[36] doParallel_1.0.16 scglmmr_0.1.0 R6_2.5.0 GenomeInfoDb_1.26.7 graphlayouts_0.7.2
[41] locfit_1.5-9.4 bitops_1.0-6 cachem_1.0.4 fgsea_1.16.0 DelayedArray_0.16.3
[46] assertthat_0.2.1 scales_1.1.1 multcomp_1.4-16 ggraph_2.0.5 enrichplot_1.10.2
[51] gtable_0.3.0 downlit_0.4.0 egg_0.4.5 processx_3.5.2 tidygraph_1.2.0
[56] sandwich_3.0-0 rlang_1.0.2 slanter_0.2-0 splines_4.0.5 rstatix_0.7.0
[61] broom_0.7.5 BiocManager_1.30.10 yaml_2.2.1 reshape2_1.4.4 abind_1.4-5
[66] backports_1.2.1 rsconnect_0.8.25 qvalue_2.22.0 clusterProfiler_3.18.1 tools_4.0.5
[71] usethis_2.0.1 ggplot2_3.3.3 ellipsis_0.3.2 gplots_3.1.1 RColorBrewer_1.1-2
[76] BiocGenerics_0.36.1 Rcpp_1.0.6 plyr_1.8.6 progress_1.2.2 zlibbioc_1.36.0
[81] purrr_0.3.4 RCurl_1.98-1.3 prettyunits_1.1.1 ps_1.5.0 ggpubr_0.4.0
[86] openssl_1.4.3 viridis_0.5.1 cowplot_1.1.1 S4Vectors_0.28.1 zoo_1.8-8
[91] SummarizedExperiment_1.20.0 haven_2.3.1 ggrepel_0.9.1 fs_1.5.0 variancePartition_1.25.6
[96] magrittr_2.0.1 data.table_1.14.0 DO.db_2.9 openxlsx_4.2.3 gh_1.2.0
[101] mvtnorm_1.1-1 whisker_0.4 packrat_0.7.0 matrixStats_0.58.0 hms_1.0.0
[106] evaluate_0.14 GSVA_1.38.2 xtable_1.8-4 pbkrtest_0.5-0.1 RhpcBLASctl_0.21-247.1
[111] XML_3.99-0.6 rio_0.5.16 readxl_1.3.1 IRanges_2.24.1 gridExtra_2.3
[116] compiler_4.0.5 tibble_3.0.6 credentials_1.3.0 KernSmooth_2.23-18 crayon_1.4.1
[121] shadowtext_0.0.9 minqa_1.2.4 htmltools_0.5.2 ggfun_0.0.4 tidyr_1.1.2
[126] DBI_1.1.1 tweenr_1.0.2 MASS_7.3-53.1 boot_1.3-27 sys_3.4
[131] Matrix_1.3-2 car_3.0-10 cli_3.3.0 rbibutils_2.0 parallel_4.0.5
[136] igraph_1.2.6 GenomicRanges_1.42.0 forcats_0.5.1 pkgconfig_2.0.3 rvcheck_0.1.8
[141] foreign_0.8-81 foreach_1.5.1 xml2_1.3.2 annotate_1.68.0 XVector_0.30.0
[146] GeneOverlap_1.26.0 estimability_1.3 stringr_1.4.0 callr_3.7.0 digest_0.6.27
[151] graph_1.68.0 rmarkdown_2.9 cellranger_1.1.0 fastmatch_1.1-0 edgeR_3.32.1
[156] GSEABase_1.52.1 curl_4.3 gtools_3.8.2 nloptr_1.2.2.2 lifecycle_1.0.0
[161] nlme_3.1-152 jsonlite_1.7.2 aod_1.3.1 carData_3.0-4 fansi_0.4.2
[166] desc_1.3.0 viridisLite_0.3.0 askpass_1.1 limma_3.46.0 pillar_1.4.7
[171] lattice_0.20-41 fastmap_1.1.0 httr_1.4.2 survival_3.2-10 GO.db_3.12.1
[176] glue_1.6.2 zip_2.1.1 gert_1.3.0 iterators_1.0.13 bit_4.0.4
[181] ggforce_0.3.3 stringi_1.5.3 blob_1.2.1 org.Hs.eg.db_3.12.0 caTools_1.18.1
[186] memoise_2.0.0 dplyr_1.0.4

jayhesselberth commented 2 years ago

Are you just pointing Github Pages to docs/? If so, the vignette is missing there, and that's why you're getting a 404.

Try running pkgdown::clean_site() and then pkgdown::build_site(), then check in docs/ for the missing files.

You've also git ignored docs/ so will have to force add / push to your repository.

I recommend letting Github Actions deal with pkgdown build/deploy, just run usethis::use_github_action("pkgdown") and then update your Github pages config to use the gh-pages branch.

MattPM commented 2 years ago

Thank you, I don't know why docs was in the gitignore. pkgdown::clean_site() pkgdown::build_site() and rm docs from gitignore solved the issue.

privefl commented 2 years ago

It seems usethis::use_pkgdown() is adding docs to the gitignore. I've just spent two hours trying to figure out what was wrong.

softloud commented 1 year ago

It seems usethis::use_pkgdown() is adding docs to the gitignore. I've just spent two hours trying to figure out what was wrong.

Thank you so much! I've been trying to solve this for weeks.