https://github.com/rootz491/gatsby-learning
learning gatsby and stuff!
https://github.com/rootz491/gatsby-learning
basics gatsbyjs learning
Last synced: 10 months ago
JSON representation
learning gatsby and stuff!
- Host: GitHub
- URL: https://github.com/rootz491/gatsby-learning
- Owner: rootz491
- Created: 2022-01-19T19:25:39.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-09T01:27:59.000Z (over 3 years ago)
- Last Synced: 2025-03-09T14:06:19.996Z (over 1 year ago)
- Topics: basics, gatsbyjs, learning
- Language: JavaScript
- Homepage:
- Size: 13.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 56
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gatsby-learning
## References
* [functions](https://www.gatsbyjs.com/docs/reference/functions/)
* Creating API endpoints with Gatsby, very similar to Next.js, i.e. create `/src/api/` folder and create `hello.js` files in it. Then access the API endpoint at route `/api/hello/`.
Handle request and responses, [read more](https://www.gatsbyjs.com/docs/reference/functions/getting-started/).
* [Routing](https://www.gatsbyjs.com/docs/reference/functions/routing/) in Gatsby functions
1. static -> `/src/api/hello.js`
2. dynamic -> `src/api/users/[id].js`
3. splat -> `src/api/files/[...].js`
*
* [Gatsby-node API](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/)
* Gatsby-node API is bascically programmatically creating pages over some dynamic content/data.
This data can be fetched via GraphQL (or Hardcoded)
*
## imp note
1. whenever installing `gatsby-plugin-mdx`, use this command:
```sh
npm install gatsby-plugin-mdx @mdx-js/mdx @mdx-js/react
```