I'm building a simple RMarkdown website. I have some already rendered HTML files, and for various reasons, it isn't feasible to re-render them within the RProj for the website. For example, I might not have access to the original Rmd file, or the Rmd file might only work within another Rproj directory.
I'm looking for a way to add the navbar to these existing HTML files.
I've searched through the documentation, googled a bunch, and asked on a couple help forums. Since I haven't turned up any answers on how to do this, I'm raising it has a feature request here. I think other people would likely find this feature very helpful too.
Does this seem like a possibility, or am I totally off base about its feasibility?
The text was updated successfully, but these errors were encountered:
jdjohn215
changed the title
Thanks for such a great package! [FR]
Adding a navbar to an existing HTML document [FR]
Feb 15, 2022
Inserting an existing full HTML file (meaning with <head> and <body>) inside another is not something straighforward - or even feasible without a iframe logic.
Using an <iframe> to load an existing file in a R Markdown website is also a solution - the navbar would be present. But sometimes an iframe is not desirable. If you want to try that, creating a Rmd in your website and using a chunk with knitr::include.
Adding a navbar in R Markdown website is done by inserting some content in the HTML during the rendering of the Rmd document. This content is the same for all the document. To do that on existing HTML file, it would require a processing of the existing HTML file to either insert the same content or replace some of the content of the existing file.
I believe this is the same limitation with any other website - you can't easily insert an existing whole HTML within the context of another website where HTML components (like navbar, footer, sidebar) are shared. It is easier to do that if the existing HTML are framgment (only body part)
I don't know if R Markdown website will handle this specific usage of including any HTML file into a website - if it does it is not something that will be very soon. You could try on your own project by processing the file to include the missing part.
Thanks for the suggestion - I'll mark as a feature request open for votes with 👍
Thanks for such a great package!
I'm building a simple RMarkdown website. I have some already rendered HTML files, and for various reasons, it isn't feasible to re-render them within the RProj for the website. For example, I might not have access to the original Rmd file, or the Rmd file might only work within another Rproj directory.
I'm looking for a way to add the navbar to these existing HTML files.
I've searched through the documentation, googled a bunch, and asked on a couple help forums. Since I haven't turned up any answers on how to do this, I'm raising it has a feature request here. I think other people would likely find this feature very helpful too.
Does this seem like a possibility, or am I totally off base about its feasibility?
The text was updated successfully, but these errors were encountered: