Maybe I'm asking the wrong questions on google, but I can't seem to find a solution to what I'm trying to accomplish.
We've created a Drupal 8 site and we need to add the existing header and footer to an external site so that it includes our site branding.
What is the best solution to accomplish this?
I have some initial thoughts, but feel like I'm way off base:
- Pull the
<header>
and<footer>
out of thepage.html.twig
template and put them into a separateheader.html.twig
andfooter.html.twig
template. (My base theme is bootstrap barrio) - Create a custom API that exposes the html from the header and footer twig templates. (I'm not sure if this even possible)
- Using the custom API, expose any paths to custom CSS/JS required for theming.
Then the external website would just call the API, grab the html/css/js and put all the gathered resources on their pages.
Is the above on the right track or am I completely wrong? If I am on the right track, how would I accomplish #2?