Site url: blog.foolishrobot.xyz
- Typescript + styled-components
- gatsby 5.x
- react-three-fiber 9.x
- howler.js
- Antd 5.x
- React 18.x
# install Gatsby-CLI
yarn add -g gatsby-cli
# clone repo
git clone https://github.com/Orainsink/gatsby-blog.git
# download dependences
yarn
# start dev server at localhost:8000
yarn start
# build project
yarn build
# write a new post
yarn new your-post-name
This blog is a personal project for practicing, so there are no special optimizations for extensibility or customization.
But if you are interested in it , you can clone this repo and then follow the steps above.
Warning: Due to firewalls, gatsby may fail to install, you need to change the host. see: https://www.ioiox.com/archives/62.html, may help.
yarn new your-post-name
use live
to start a live code block in mdx file:
```js live name=demo.md
use line
to highlight lines
```js line={1,2,3-4} name=demo.md
You can change global styles by modifying src/assets/theme/
List of environment variables and associated plugins, which can be removed if not needed.
.env
TRACKING_ID=xxx
GATSBY_ALGOLIA_APP_ID=xxx
GATSBY_ALGOLIA_SEARCH_KEY=xxx
ALGOLIA_INDEX_NAME=xxx
ALGOLIA_ADMIN_KEY=xxx
GATSBY_HEWEATHER_KEY=xxx
GATSBY_SENTRY_DSN=xxx
GATSBY_SENTRY_AUTH=xxx
TRACKING_ID
: Google analytics tracking id
GATSBY_ALGOLIA_APP_ID
GATSBY_ALGOLIA_SEARCH_KEY
ALGOLIA_ADMIN_KEY
ALGOLIA_INDEX_NAME
Used by gatsby-plugin-algolia
option.
https://dev.qweather.com/docs/start/get-key/
GATSBY_HEWEATHER_KEY
Used by index animation
https://docs.sentry.io/platforms/javascript/guides/gatsby/
GATSBY_SENTRY_DSN
: sentry dsn
GATSBY_SENTRY_AUTH
: sentry auth id
Used by @sentry/gatsby
plugin
https://docs.github.com/en/actions/reference/authentication-in-a-workflow
GH_TOKEN
: GITHUB_TOKEN
Used by gh-pages
plugin.