Now for someting new. We are going to use Gulp with Handlebars to create our own CMS system.
First of all, We want to be able to process markdown files and create html files with Gulp with plugin.
1
| |
For more information about gulp-markdown check out https://www.npmjs.org/package/gulp-markdown
We will read all the markdown files in the contents/pages folder and generate html files.
1 2 3 4 5 6 7 8 | |
Lets create our first page.
1
| |
When We run our gulp generate_pages task, We will take the markdown and convert it into html and place the files in the build/pages directory.
1 2 3 4 | |
If We look in our build/pages directory, We should see our new html file.
1
| |
If We visit http://localhost:8000/pages/first_page.html we should see our generated webpage.