etiennebacher / altdoc

Alternative to pkgdown to document R packages
https://altdoc.etiennebacher.com
Other
67 stars 9 forks source link

`path` and `$ALTDOC_MAN_BLOCK` problems #198

Closed vincentarelbundock closed 10 months ago

vincentarelbundock commented 10 months ago

I tried on the tinytest repo, which is a bit different than the ones we used so far, because the package is hosted in pkg/:

git clone git@github.com:markvanderloo/tinytest.git
cd tinytest
R
library(altdoc)
setup_docs("docsify", path = "pkg")
render_docs(path = "pkg")

Error: No root directory found in /home/vincent/workdir/tinytest or its parent directories. Root criterion: contains a file "DESCRIPTION" with contents matching "^Package: "

Also, if I do this:

setwd("pkg")
render_docs()

I get a broken sidebar because there are no .Rd files in the package structure.

broken_sidebar

etiennebacher commented 10 months ago

I get a broken sidebar because there are no .Rd files in the package structure.

This is weird, there is documentation with roxygen syntax but where are all the Rd files? I thought the man folder was mandatory for releasing on CRAN.

vincentarelbundock commented 10 months ago

Yes, I think Mark creates the man pages before releasing instead of always hosting them in Github.

The man pages show up properly once I run devtools::document(), but regardless, we should always remove the $ALTDOC variable when there are no .Rd files.

vincentarelbundock commented 10 months ago

The man problem is only an issue with docsify, so the code to fix will be here: https://github.com/etiennebacher/altdoc/blob/main/R/settings_docsify.R#L60

The path argument does not work in render_docs(), regardless of the tool.