How to create a new template
If you don't like any of the built-in template, here's how to create a new one using both the basic and advanced methods.
Using the basic workflow
Before you get started, make sure you navigate to the dist/
folder. This is where you'll be creating your new template.
- Create a new file called
index.html
and open it in your code editor of choice. - Paste the following code in (this is your starting block):
- Update the title and meta information to fit your project.
- Choose the color scheme and font pair by loading a different stylesheet.
- Add your page content by replacing the comment inside the
body
tag. To get page content, simply copy and paste the HTML code you want from the other pages.
Using the advanced workflow
Before creating a new page, it's recommended you start the Gulp workflow. If you don't know how to do that, check out the dedicated documentation page. Then, here's what you need to do:
- Create a new file called
index.html
insidesrc/pages/
. - Then, paste in your starter block:
- Edit the Dark Matter variables to reflect the page title, description, chosen color scheme and font pair.
- Add the page content by pasting HTML code from the other pages or by loading partials. HTML code can be used alongside partial imports.