Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
templates/content-home.html is ignored if source is .Rmd #787
When building the home page, the template content-home.html is only respected if the source is a .md or DESCRIPTION file. If it's index.Rmd or README.Rmd, the template content-article.html is used instead.
That caught me out whilst building a custom site with my own templates, and means the sidebar can't be removed from the home page without also removing it from all the articles.
The switch happens here:
I've pushed a branch on my fork here with one passing test (for index.md) and one failing test (for index.Rmd) to demonstrate.
Let me know if you'd like that in a PR. Unfortunately I won't have time in the near future to send a fix.
I've rebased that branch with the failing test onto the current master: https://github.com/goldingn/pkgdown/tree/rmd_home_template
I might be able to take a swing at getting home templates to work for Rmds this week.
I'd appreciate any pointers though. Especially why md and Rmd are treated so differently, rather than converting Rmd to md first.
The general issue is that a custom content-home template is ignored if the source file is an Rmd (but not if it is an md), which isn't documented and seems like a bug.
My main aim is to get rid of the sidebar and the column it goes in, and take the index content out of the the row and column it's in, since I want a full width banner.
I could do this if I could use a custom template of:
Those rows and columns are hard-coded into the content-home template:
How would I turn them off with css?