All Projects β†’ gatsbyjs β†’ gatsby-starter-shopify

gatsbyjs / gatsby-starter-shopify

Licence: 0BSD License
A Gatsby starter using the latest Shopify plugin showcasing a store with product overview, individual product pages, and a cart

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
shell
77523 projects

Projects that are alternatives of or similar to gatsby-starter-shopify

Midway
Headless Starter with Sanity + Gatsby + Shopify Repo
Stars: ✭ 195 (-14.85%)
Mutual labels:  gatsby, shopify
Gatsby Shopify Theme
πŸ›’ Simple theme to build a blazing simple and fast store with Gatsby and Shopify.
Stars: ✭ 95 (-58.52%)
Mutual labels:  gatsby, shopify
Builder
Drag and drop page building using your code components
Stars: ✭ 1,281 (+459.39%)
Mutual labels:  gatsby, shopify
gatsby-plugin-apollo-client
πŸ“‘Inject a Shopify Apollo Client into the browser.
Stars: ✭ 20 (-91.27%)
Mutual labels:  gatsby, shopify
arepa.dev
Recursos en espaΓ±ol para aprender y dominar JavaScript.
Stars: ✭ 29 (-87.34%)
Mutual labels:  gatsby
gatsby-plugin-disqus
πŸ’¬ A plugin for adding Disqus comments to GatsbyJS
Stars: ✭ 40 (-82.53%)
Mutual labels:  gatsby
gatsby-plugin-optimize-svgs
A Gatsby Plugin to minify SVGs output to the filesystem during the build.
Stars: ✭ 39 (-82.97%)
Mutual labels:  gatsby
contentful-ui-shopify
Integrate Shopify products with Contentful CMS
Stars: ✭ 28 (-87.77%)
Mutual labels:  shopify
gatsby-theme-amsterdam
A Gatsby theme for artists, photographers and other creative folks πŸ‘¨β€πŸŽ¨
Stars: ✭ 133 (-41.92%)
Mutual labels:  gatsby
gatsby-wordpress-typescript-scss-blog
Gatsby Wordpress Typescript Blog Boilerplate
Stars: ✭ 50 (-78.17%)
Mutual labels:  gatsby
gatsby-source-moltin
πŸš€ Gatsby source plugin for building Elastic Path Commerce Cloud powered eCommerce websites
Stars: ✭ 21 (-90.83%)
Mutual labels:  gatsby
dds.mil
The website of the Defense Digital Service.
Stars: ✭ 18 (-92.14%)
Mutual labels:  gatsby
gatsby-simple-blog
an easily configurable gatsby-starter-blog with overreacted looking and tags, breadcrumbs, disqus, i18n, eslint, algolia supported
Stars: ✭ 48 (-79.04%)
Mutual labels:  gatsby
shopify-product-image-slider
Implementation of the Slick image carousel into a Shopify store
Stars: ✭ 21 (-90.83%)
Mutual labels:  shopify
snipcart-gatsby-demo
Simple e-commerce for socks made with Gatsby, Snipcart and DatoCMS
Stars: ✭ 15 (-93.45%)
Mutual labels:  gatsby
gatsby-markdown-blog-starter
Gatsby Markdown Blog Starter, demo link:
Stars: ✭ 57 (-75.11%)
Mutual labels:  gatsby
dothq.co
This repository has moved to:
Stars: ✭ 17 (-92.58%)
Mutual labels:  gatsby
subtle-ui
A collection of clever yet understated user interactions found on the web
Stars: ✭ 39 (-82.97%)
Mutual labels:  gatsby
plasmic
Visual page builder and web design tool for any website or web app tech stack
Stars: ✭ 1,475 (+544.1%)
Mutual labels:  gatsby
shopify-development-resources
A List of resources for Shopify development
Stars: ✭ 56 (-75.55%)
Mutual labels:  shopify

Gatsby

Gatsby Starter Shopify

Kick off your next Shopify project with this boilerplate. This starter creates a store with a custom landing page, individual filtered views for each product, detailed product pages, advanced instant search and a shopping cart. All styled with CSS Modules.

Deploy this starter with one click on Gatsby Cloud:

Deploy to Gatsby Cloud

Check out the demo site showcasing a proof-of-concept with 10k products and 30k variants.

πŸš€ Quick start

  1. Create a Gatsby site.

    Use the Gatsby CLI to create a new site, specifying the Shopify starter.

    # create a new Gatsby site using the Shopify starter
    npx gatsby new my-shopify-store https://github.com/gatsbyjs/gatsby-starter-shopify
  2. Link to your store

    Follow these instructions here to link your Shopify store. Create a .env file with your Shopify store URL, password, and Storefront access token, using the .env.example file as an example. If you want to try with a development store, see the sample data and instructions here.

  3. Start developing.

    Navigate into your new site’s directory and start it up.

    cd my-shopify-starter/
    npm start
  4. 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-shopify-starter directory in your code editor of choice and edit src/pages/index.jsx. Save your changes and the browser will update in real time!

🧐 What's inside?

A quick look at the top-level files and directories you'll see in this project.

.
β”œβ”€β”€ example
β”œβ”€β”€ src
β”œβ”€β”€ static
β”œβ”€β”€ .env.example
β”œβ”€β”€ gatsby-browser.js
β”œβ”€β”€ gatsby-config.js
└── gatsby-node.js
  1. /example: This directory includes a CSV file containing sample data to import into a development store. There are also instructions on generating your own sample data, and a link to a dataset with 30,000 SKUs.

  2. /src: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. src is a convention for β€œsource code”.

  3. /static: Every file in this directory will be copied over to the public folder during the build. Learn more about using the static folder. In this project it holds the og:image and favicons.

  4. /.env.example: Duplicate this file, rename it to .env, and fill out the keys. You'll need to define those environment variables to get the source plugin, cart and search working.

  5. gatsby-browser.js: This file is where Gatsby expects to find any usage of the Gatsby browser APIs (if any). These allow customization/extension of default Gatsby settings affecting the browser. In this project it wraps the whole application with the context provider of the store/shopping cart.

  6. 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).

  7. gatsby-node.js: This file is where Gatsby expects to find any usage of the Gatsby Node APIs (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process. In this project it adds a custom Babel plugin to Gatsby.

Detailed look into src

The whole logic for how the site looks and behaves is inside src.

.
β”œβ”€β”€ components
β”œβ”€β”€ context
β”œβ”€β”€ icons
β”œβ”€β”€ images
β”œβ”€β”€ pages
β”œβ”€β”€ styles
└── utils
  1. /components: Contains the React components used for building out the pages.

  2. /context: Contains the store context (e.g. adding/deleting/updating items in shopping cart, accessing Shopify), and the urql context used for search using Shopify's Storefront API.

  3. /icons: Contains all custom SVG icons and the logo.

  4. /pages: Contains the homepage and all automatically generated pages for each product category and individual product pages. The File System Route API is used to create those pages from your Shopify data.

  5. /styles: Contains globals styles. These are variables.css, used to define shared CSS custom properties, reset.css, which contains a CSS reset based on Chakra, and global.css, which includes a tiny set of global styles.

  6. /utils: Utility functions, e.g. formatting the price correctly, plus custom hooks used for handling search and pagination.

🎨 Styling

The site uses CSS Modules for styling, which allows you to use regular CSS, scoped to the individual component. Theme values such as fonts, colors and spacing are set in src/styles/variables.css.

SSR Search Page

The /search page uses server-side rendering to show a list of products based on filters and search terms in the URL query parameters.

πŸŽ“ 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.

πŸ’« Deploy

Build, Deploy, and Host On The Only Cloud Built For Gatsby

Gatsby Cloud is an end-to-end cloud platform specifically built for the Gatsby framework that combines a modern developer experience with an optimized, global edge network.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].