Run the following commands:
$ npm i
$ npm run watch
All content can be found in the /content
folder. It is contained in markdown files. View the markdown cheatsheet for more information.
New pages can be with markdown files. For example to create a contact page, follow these steps:
- In the
content
folder, create a new folder calledcontact-us
. - In the
content/contact-us
folder, create a new file namedcontact.md
- Add the following content to the page
---
path: /contact
title: Contact Us
type: standard
---
# Contact the team
To get into contact with the team, please email at abc@example.com
The path
attribute is the URL and the title
attribute is for the title of the page.
To add links to new pages in the main nav bar or the footer, follow these steps:
- Open up the
gatsby-config.js
file. - Find the
menuLinks
key for main nav links and thefooterLinks
key for the footer items. - If you want to add a main nav link to the contact page we created above, add an object to the
menuLinks
key.
menuLinks: [
{
text: "Home",
link: "/",
},
{
text: "About",
link: "/about",
},
]
menuLinks: [
{
text: "Home",
link: "/",
},
{
text: "About",
link: "/about",
},
{
text: "Contact",
link: "/contact",
},
],
The footer links can be updated in a similar way using the footerLinks
key in the gatsby-config.js
file.