-6

I am currently learning HTML/CSS to code my own blog. However,how do I create a template that I can add my title and content and other feature that helps me to publish it into my blog rather than doing it on the code

  • This question seems quite broad. Anyway I suggest to not create your own cms but using an existing one instead, in my opinion there's no need to reinvent the wheel. Therefore for lightweight solutions I would use a website generator such as Jekyll or a templating tool such as Handlebars. – Giulio Ambrogi Jan 21 '18 at 19:19
  • Or, if you really wanted to get interesting, you could look at [Javascript template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals), which allow you to make templates with JS. – yaakov Jan 21 '18 at 19:21
  • But a templating solution would be a lot easier. – yaakov Jan 21 '18 at 19:22

1 Answers1

0

Actually, you're looking for something called server-side scripting and database management. Current popular and most easy to learn is PHP. Combination with database (most preferred with PHP is MySQL) will give you what you're looking for.

  1. First install local server you can do that with WampServer. After installation enable your web server (Apache) and database, MySQL. If you get an error with port 80, close Skype or similiar programs that are using that port.

  2. Second step is to navigate to your wamp folder (probably at C:/wamp if you're on Windows) and then navigate to htdocs folder.

  3. Here, you are starting to develop app. Now you should follow one of tutorials you can find on internet (and bunch of them), just type "php mysql blog" on Google. Or you can download this great and simple example of blog on the github, click here.

Good luck!

harisdev
  • 4,146
  • 5
  • 19
  • 25