Is it possible to create a static header and footer for Hugo? So when I go to another page, the header and footer do not load again. Just the page content change…
you really need this ~0.x ms??
You end with a more complex structure - mostly slower
@somratpro may be you can look at https://github.com/turbolinks/turbolinks.
And Bep have a Hugo module for using this : https://github.com/gohugoio/hugo-mod-jslibs/tree/master/turbolinks
You could render the content without header and footer and use Vue or any other library to load the content dynamically. Things you will have to add to your whole setup: ways to fall back on for people with a Javascript allergy, properly updating the URL to be unique for each unique content particle, SEO…
Technically speaking, if you use particalCached
for your header and footer (not the navigation part if you show “current” page items differently styled) it will build fast and load fast, but in the end it will load header/footer again each time you load a page.
In the end, what you are trying is to use a STATIC site generator to create DYNAMIC websites. It’s possible. But people on the street will give you looks.
Exceptional!
can you tell me how to do it?
checkout _default/baseof.html and replace Partial with partialCached for your header and footer
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.