Giter Club home page Giter Club logo

gatsby-starter-lah's Introduction

hello world from lah. gatsby starter built in gatsby + typescript + mdx

๐Ÿ’จ Quick start

Use the Gatsby CLI (install instructions) to create a new site, specifying the default starter.

  1. Create a Gatsby site
npx gatsby new your-blog-name https://github.com/leahincom/gatsby-starter-lah

Instead of using npx, use the Gatsby CLI (install instructions) to create a new site, specifying the default starter.

npm install -g gatsby-cli
gatsby new your-blog-name https://github.com/leahincom/gatsby-starter-lah
  1. Start developing

before you go, you should setup .env. This is provided in .env.example.

// required
GITHUB_PERSONAL_ACCESS_TOKEN=""

// preferred
GTM_CONTAINER_ID=""
MONGODB_REPLICA_SET=""
MONGODB_ADDRESS=""
MONGODB_USERNAME=""
MONGODB_PASSWORD=""
MONGODB_NAME=""
MONGODB_COLLECTION_NAME=""
cd your-blog-name/
yarn develop // gatsby develop

There you go! Open localhost:8000 and ya'll see something's going on.

  1. Add your posts ๐ŸŒˆ

No more hard works for simple posts! Write your posts in md, mdx by putting the content inside /posts folder.

Your own category can be made in enum in gatsby-node.ts.

  1. ๐Ÿš€ Quick start (Gatsby Cloud)

Deploy this starter with one click on Gatsby Cloud: Deploy to Gatsby Cloud

or whatever you like :)

๐Ÿ’ Customize

Gatsby config

/ โ”œโ”€โ”€ gatsby-browser.ts // css, wrapPageElement, ... โ”œโ”€โ”€ wrapPageElement.tsx โ”œโ”€โ”€ gatsby-ssr.tsx // same as gatsby-browser.ts with more ssr settings for stitches โ”œโ”€โ”€ gatsby-config.ts // default config, plugins, ... โ””โ”€โ”€ gatsby-node.ts // create types and configure page props for mdx settings

Structure

src โ”œโ”€โ”€ assets โ”œโ”€โ”€ components // individual components needed for default page styling โ”œโ”€โ”€ hooks โ”œโ”€โ”€ layouts // default layout used in pages โ”œโ”€โ”€ pages // routing for basic pages except for posts (which are served from /posts) โ”œโ”€โ”€ styles โ”‚ โ”œโ”€โ”€ global.ts // global style with stitches โ”‚ โ”œโ”€โ”€ text.ts // custom text styles โ”‚ โ”œโ”€โ”€ normlize.css โ”‚ โ””โ”€โ”€ stitches.config.ts // custom media setting โ”œโ”€โ”€ templates // used for posts styling โ”œโ”€โ”€ types โ”œโ”€โ”€ utils โ””โ”€โ”€ constants.ts

gatsby-starter-lah's People

Contributors

leahincom avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.