Our great sponsors
-
eleventy 🕚⚡️
A simpler site generator. Transforms a directory of templates (of varying types) into HTML.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
It is great that you are asking this. Repeating code like that is absolutely horrible and you are right to seek a solution. Static site generators like Hugo or 11ty are pretty common solutions for this. If you are willing to get into frontend frameworks that client-side routing is arguably an even better solution to this but will involve a lot of new concepts to I'd go with a static site generator for now
It is great that you are asking this. Repeating code like that is absolutely horrible and you are right to seek a solution. Static site generators like Hugo or 11ty are pretty common solutions for this. If you are willing to get into frontend frameworks that client-side routing is arguably an even better solution to this but will involve a lot of new concepts to I'd go with a static site generator for now