Invalid yaml metadata if articles in subdirectories
hadley opened this issue · comments
e.g. for bslib:
[main] > pkgdown::as_pkgdown(".")$vignettes
# A tibble: 15 × 6
name file_in file_out title description depth
<fs::path> <fs::path> <fs::path> <chr> <chr> <int>
1 any-project/index vignettes/any-project/index.Rmd …ndex.html Any … NA 2
2 bs4-variables/index vignettes/bs4-variables/index.Rmd …ndex.html Boot… NA 2
3 bs5-variables/index vignettes/bs5-variables/index.Rmd …ndex.html Boot… NA 2
4 cards/index vignettes/cards/index.Rmd …ndex.html Cards NA 2
5 column-layout/index vignettes/column-layout/index.Rmd …ndex.html Colu… NA 2
6 custom-components/index …ettes/custom-components/index.Rmd …ndex.html Cust… NA 2
7 dashboards/index vignettes/dashboards/index.Rmd …ndex.html Dash… NA 2
8 examples/index vignettes/examples/index.Rmd …ndex.html Exam… NA 2
9 filling/index vignettes/filling/index.Rmd …ndex.html Fill… NA 2
10 sidebars/index vignettes/sidebars/index.Rmd …ndex.html Side… NA 2
11 theming/index vignettes/theming/index.Rmd …ndex.html Them… NA 2
12 tooltips-popovers/index …ettes/tooltips-popovers/index.Rmd …ndex.html Tool… NA 2
13 utility-classes/index …gnettes/utility-classes/index.Rmd …ndex.html Util… NA 2
14 value-boxes/index vignettes/value-boxes/index.Rmd …ndex.html Valu… NA 2
15 why-sass/index vignettes/why-sass/index.Rmd …ndex.html Why … NA 2
Which yields:
articles:
index: any-project/index.html
index: bs4-variables/index.html
index: bs5-variables/index.html
index: cards/index.html
index: column-layout/index.html
index: custom-components/index.html
index: dashboards/index.html
index: examples/index.html
index: filling/index.html
index: sidebars/index.html
index: theming/index.html
index: tooltips-popovers/index.html
index: utility-classes/index.html
index: value-boxes/index.html
index: why-sass/index.html
Because article_index()
strips the directory name.
Not sure what the right thing to do here is. Maybe just drop them from the index because there's no way to autolink to them anyway? (i.e. this really should just be a list of vignettes, not articles). But that's probably a bad idea if we ever do add auto-linking syntax. So maybe ok to just use the name
unprocessed?