You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing with pkgdown to check that some of what I say in R Packages is actually correct.
I sat down to write about the article index and I wanted to say what its default is. For example, the reference index defaults to alphabetical. I assumed I would find the same is true for the articles, but I was wrong. Or, rather, it is alphabetical for some definition of alphabetical, but not the one I expected.
The toy package has 2 vignettes (alfa and bravo) and 1 non-vignette article (charlie).
$vignettes
# A tibble: 3 × 6
name file_in file_out title description depth
<fs::path> <fs::path> <fs::path> <chr> <chr> <int>
1 alfa vignettes/alfa.Rmd articles/alfa.html alfa NA 1
2 articles/charlie vignettes/articles/charlie.Rmd articles/charlie.html charlie NA 1
3 bravo vignettes/bravo.Rmd articles/bravo.html bravo NA 1
Here's what the default article index looks like:
So the default order appears to be based on file_in, with the leading vignettes stripped off. Which is going to insert any non-vignette articles in the articles subdirectory very early in the list. I think either of these orderings are a more expected default:
Alphabetical on basename(file_out)
Vignettes, then non-vignette articles, alphabetical within each category
The text was updated successfully, but these errors were encountered:
I've been playing with pkgdown to check that some of what I say in R Packages is actually correct.
I sat down to write about the article index and I wanted to say what its default is. For example, the reference index defaults to alphabetical. I assumed I would find the same is true for the articles, but I was wrong. Or, rather, it is alphabetical for some definition of alphabetical, but not the one I expected.
The toy package has 2 vignettes (alfa and bravo) and 1 non-vignette article (charlie).
Here's what the default article index looks like:
So the default order appears to be based on
file_in
, with the leadingvignettes
stripped off. Which is going to insert any non-vignette articles in thearticles
subdirectory very early in the list. I think either of these orderings are a more expected default:basename(file_out)
The text was updated successfully, but these errors were encountered: