hello world from lah.
gatsby starter built in gatsby + typescript + mdx
Use the Gatsby CLI (install instructions) to create a new site, specifying the default starter.
- 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
- 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.
- 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
.
- ๐ Quick start (Gatsby Cloud)
Deploy this starter with one click on Gatsby Cloud:
or whatever you like :)
/ โโโ 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
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