Is there a way to use an HTML file “template” for other HTML files in NodeJS?

I am currently trying to make a website that has multiple pages but all of them will have the exact same navbar. The only solutions I could find are some client-side solutions using the <template> tag, but I would like to do it server side. Is there any way to do this?

Answer

I think you are misunderstanding the template tag. It’s not for server-side rendering.

Your question doesn’t really specify what stack you are using besides NodeJS.

Maybe Pug might be something that would interest you.