Skip to content

Commit

Permalink
docs(www): improve Gatsby guide (shadcn-ui#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts authored and suleymanbariseser committed Jul 25, 2023
1 parent b20d9bb commit 313d79a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions apps/www/content/docs/installation/gatsby.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ description: Install and configure Gatsby.

### Create project

Start by creating a new Gatsby project using `Gatsby CLI`:
Start by creating a new Gatsby project using `create-gatsby`:

```bash
npx gatsby new
npm init gatsby
```

### Configure your Gatsby project to use TypeScript and Tailwind CSS
Expand All @@ -35,7 +35,7 @@ You will be asked a few questions to configure your project:

### Edit tsconfig.json file

Add the code below to the tsconfig.json file to resolve paths:
Add the code below to the `tsconfig.json` file to resolve paths:

```ts {4-9} showLineNumbers
{
Expand All @@ -52,13 +52,14 @@ Add the code below to the tsconfig.json file to resolve paths:
}
```

### Create gatsby-node.js file
### Create gatsby-node.ts file

Create a `gatsby-node.js` file at the root of your project if it doesn’t already exist, and add the code below to the `gatsby-node.js` file so your app can resolve paths:
Create a `gatsby-node.ts` file at the root of your project if it doesn’t already exist, and add the code below to the `gatsby-node` file so your app can resolve paths:

```js
const path = require("path")
exports.onCreateWebpackConfig = ({ actions }) => {
```ts
import * as path from "path"

export const onCreateWebpackConfig = ({ actions }) => {
actions.setWebpackConfig({
resolve: {
alias: {
Expand Down

0 comments on commit 313d79a

Please sign in to comment.