r-lib / pkgdown

Generate static html documentation for an R package

Home Page:https://pkgdown.r-lib.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

trouble with excluding topics

chlebowa opened this issue · comments

1. Excluding a topic with -<topic_name> causes an error:

-- Building function reference -------------------------------------------------
Error: 
! in callr subprocess.
Caused by error in `check_missing_topics(rows, pkg)`:
! All topics must be included in reference index
✖ Missing topics: <topic name>
ℹ Either add to _pkgdown.yml or use @keywords internal
ℹ See `$stdout` for standard output.
Type .Last.error to see the more details.

This seems to have been solved but here we are.

2. Using section - title: "internal" cannot hide aliases, only a whole topic.

I want to leave the reference index to list a class constructor (<class_name>) but hide helpers (e.g. is.<class_name>) and S3 methods. (All the functions in question are described in the same Rd file using @rdname.
I went with

reference:
  - title: <title>
    contents:
      - <class_name>
  - title: "internal"
    contents:
      - ends_with(".<class_name>")

The exclusion by "internal" is ignored, all functions appear in the reference index.

sessionInfo
R version 4.3.2 (2023-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/Prague
tzcode source: system (glibc)

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

other attached packages:
[1] pkgdown_2.0.7

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5             cli_3.6.2               knitr_1.45              rlang_1.1.2             xfun_0.41               processx_3.8.3         
 [7] purrr_1.0.2             glue_1.6.2              htmltools_0.5.7         ps_1.7.5                fansi_1.0.6             rmarkdown_2.25         
[13] evaluate_0.23           tibble_3.2.1            fastmap_1.1.1           yaml_2.3.8              lifecycle_1.0.4         memoise_2.0.1          
[19] compiler_4.3.2          fs_1.6.3                nesttemplate_0.0.0.9007 pkgconfig_2.0.3         rstudioapi_0.15.0       digest_0.6.33          
[25] R6_2.5.1                utf8_1.2.4              pillar_1.9.0            callr_3.7.3             magrittr_2.0.3          tools_4.3.2            
[31] withr_2.5.2             cachem_1.0.8            desc_1.4.3             
  1. Is presumably fixed in the dev version.
  2. We don't currently have a solution for this.