Search code examples
javascripthtmlcssdynamicblogs

Do I need to change source code of my website every time I want to update contents?


I have made a blog post website using html, css and JavaScript. But, every time I want to update or post a new post, its need to change the main source code to do that. Is there any way to update/post on exact placeholder of my website without changing any source code?


Solution

  • If you have control over the backend, you can create a database that stores the data for posts. Then, whenever you need to create a post, have an interface on the front-end that allows you to add/modify the data in database.

    When web requests are made to the blog, look up the database and render the posts that are in it.

    These are the bare-bones of what's commonly known as a "content management system". Once the code is all set up, there shouldn't be any need for further coding to add, edit, and remove content.