π Quick start
-
Create a Gatsby site.
Use the Gatsby CLI to create a new site, specifying the default starter.
# create a new Gatsby site using the default starter gatsby new my-primer-starter https://github.com/thomaswang/gatsby-starter-primer
-
Start developing.
Navigate into your new siteβs directory and start it up.
cd my-primer-starter/ gatsby develop
-
Open the source code and start editing!
Your site is now running at
http://localhost:8000
!Note: You'll also see a second link:
http://localhost:8000/___graphql
. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.Open the
my-primer-starter
directory in your code editor of choice and editsrc/pages/index.js
. Save your changes and the browser will update in real time!
π Important files
Remember to edit these files to customize the basic template:
-
gatsby-config.js
: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins youβd like to include, etc. (Check out the config docs for more detail). -
src/components/nav.js
: This is your header component. Edit the name and website link! -
src/pages/index.js
: This is your index page that loads at/
. Customize it to make it your own.
π Learning Gatsby
Looking for more guidance? Full documentation for Gatsby lives on the website. Here are some places to start:
-
For most developers, we recommend starting with our in-depth tutorial for creating a site with Gatsby. It starts with zero assumptions about your level of ability and walks through every step of the process.
-
To dive straight into code samples, head to our documentation. In particular, check out the Guides, API Reference, and Advanced Tutorials sections in the sidebar.
π· Using Primer
The design of the page is based on the Primer website and uses Primer React component library. Primer is open-source and and maintained by GitHubβs Design Systems team.
Take a look at their documentation and see what you can make!