In a simple RMarkdown website, can I include the navbar on HTML files rendered outside of the project?

A simple RMarkdown website has a navigation bar, defined in _site.yml . The YAML bit looks like this:

navbar:
  title: "My Website"
  left:
    - text: "Home"
      href: index.html
    - text: "About"
      href: about.html

When you render a new .rmd or .md file in the website's Rproj directory, the website's navbar is automatically added to the resulting HTML.

But sometimes I've got an HTML page I'd like to add to the website, which has already been rendered elsewhere. For various reasons, it may not be feasible to re-render the .Rmd file in the website project.

Is there a good way to include the website's navbar in an HTML file that I've copy/pasted into the website directory?

I believe this question has been cross posted on Github

See there for some discussion

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.