Building the basic templates
Now, let's add the basic templates to our blog by creating a file called layout.html
in the my-meteor-blog/client/templates
folder. This template will serve as the wrapper template for our blog layout. To build the basic templates, perform the following steps:
- Add the following lines of code to
layout.html
, which we just created:<template name="layout"> <header> <div class="container"> <h1>My Meteor Single Page App</h1> <ul> <li> <a href="/">Home</a> </li> <li> <a href="/about">About</a> </li> </ul> </div> </header> <div class="container"> <main> </main> </div> </template>
- Next, we will create the home page template, which will later list all our blogs posts. In the same templates folder...