Building our development environment
In the first chapter, we kept our Harp.js
development environment pretty basic. We did this because we want to be able to use it as a boilerplate for all our projects. The first thing that we need to do in this chapter is expand on our original work to customize and extend it for our restaurant website.
Adding more pages
Now, the first thing we should do is update _data.json
with all the new pages that we'll be building for our restaurant website. Along with our home page, let's add three new pages: Menu, About, and Contact. Our file should look like this:
{ "index": { "pageTitle": "Home" }, "menu": { "pageTitle": "Menu" }, "about": { "pageTitle": "About" }, "contact": { "pageTitle": "Contact" } }
As you can see, I've added three new sections to our JSON file. Make sure you name your files to match the first part. Then, I've defined a pageTitle
value for each page. Save the file and close it.
Note
The _harp.json
doesn't require...