html Question regarding web development
Go to solution
Solved by colonel_mortis,
There are a few ways that you could do it, but manually creating lots of HTML files is generally not the best option.
- Use server-side scripting (node.js, ruby, php, go, ...) to generate the pages on request, using a database or similar to store the content
- Use client-side scripting (react, vue, angular) for the front end, then serve the content separately (eg have json files with the page content, which is then rendered on the client side)
- Use server-side precompilation (jekyll, gatsby) to precompile static HTML files from a template and the data
The advantages of all of these approaches is that they allow you to modify the template independently from the content, so if you change the design of the page or add a nav item, you don't need to manually edit all of the actual pages.
If you expect the content to not change very often, and to only ever be changed by you, then server-side precompilation is probably best. On the other hand, if you want to expose an interface for non-technical users to make changes, compiling the pages might be more awkward, and either of the other options ought to work fine.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now