If you don't plan on making the content dynamic, you should look into a html compiler, such as Pug. You can use includes and build your HTML once locally.
meta(name="description" content="This meta tag will be on all pages")
meta(name="title" content="Hello world")
title Hello world
link(inline rel="stylesheet" href="src/style/style.css")
But wouldn't this require a rewrite of all my code to be in the pug syntax?
I worry that this could become less popular in the future and I would eventually have to port it again. Is this different from creating a react component in terms of how opinionated the syntax is?
Pug is a template engine, so you would write your code on your machine and it would print out html files that you distribute.
You're right that this could be less popular in the future, but I would also argue that since it's a development tool that you would use and not something that is dependent on the client this is less of an issue.
Handlebars.js and Pug are both template engines and you should not require the user to compile or parse your templates, this will increase runtime. (handlebarsjs.com/precompilation.html)
In the end, these are all tools, and you could use either or use React, it's all about choice. You might start a simple little ToDo app or a codepen.io to test out these things before committing to one.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.