Closed anders-kolstad closed 1 year ago
Problem still there after #164 where I did a clean_book()
Example:
functional_plant_indicators_natopen.Rmd
(first line: # Functional Plant Indicators - Naturally Open Ecosystems {#functional-plant-indicators-open}
)
->
docs/functional_plant_indikcators_natopen.md
->
docs/Functional_plant_indikcators_natopen.html + docs/functional_plant_indicators_natopen_files/figure-html
The html file name is the only place (exect the chapter title, which is different in other aspects as well) wheree Functional is written with a capital F. Why is this happening?
Any ideas @DrMattG ? I guess I can change the anchor in the titles to have capital F's, but I wouldn't know why I was doing it.
Fixed with #165.
The problem:
The chapter title anchors had previously been with capital F, like this: {#Functional-blablabla}. This resulted in html files with capital F's. After removing the capital F in the ancor, and replacing with a small f I re-rendered the book. This produced html's with small f's. But, git treats the old file (the one with captial F) as modified and not added. Therefore it keeps the old name.
The solution:
bookdown::clean_book(clean=T)
is not enough.
You also have to commit once before rendering again.
The links to the two chapters functional plant indicators in naturally open and semi-natural ecosystems dont work. The ones in the left menu that is. The embedded hypperlink points to
https://ninanor.github.io/ecosystemCondition/functional-plant-indicators-open.html
which does not exist. Changing the small f to a large F makes it work again.
https://ninanor.github.io/ecosystemCondition/Functional-plant-indicators-open.html
The rmd file is called
functional_plant_indicators_natopen.Rmd
. Note the small f).The
_bookdown.yml
references that file name correctly. The rendered md files under/docs/
are named in the exact same way. But the subsequent html files are named with capital first letter and hyphens rather than underscores. The html file name comes from the anchor on the first header in the rmd file. For semi-natural and naturally open the anchors are written with a small f. For wetlands I used a capital F, and that one works. But for other chapters, like alien species, the anchor and the html file name both have small a's.Not sure how the logic is here. Perhaps a
bookdown::clean_book()
is required.