Skip to content

Commit 9dfb0ec

Browse files
Add a page about themes, and fix a few issues (#44)
1 parent 6d84c5b commit 9dfb0ec

File tree

5 files changed

+398
-13
lines changed

5 files changed

+398
-13
lines changed

packages/docs/docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"pages": [
3030
"introduction",
3131
"installation",
32+
"theme",
3233
"fonts",
3334
"faq",
3435
{

packages/docs/export-to-cursor.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ To use them:
8484
# Additional Resources
8585

8686
- TypeScript Handbook: https://www.typescriptlang.org/docs/handbook/intro.html
87-
- TailwindCSS Documentation: https://v3.tailwindcss.com/docs/installation
87+
- TailwindCSS Documentation: https://v3.tailwindcss.com/docs/installation/using-postcss
8888
- React Documentation: https://react.dev/reference/react
8989
- Supabase Documentation: https://supabase.com/docs
9090
- Subframe Help: https://help.subframe.com/en/collections/9444971-developing-with-subframe

packages/docs/fonts.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ Make sure you've first [installed Subframe](/installation).
66

77
To ensure the right fonts load in your development environment you'll need to add a snippet similar to the following to your `<head>` tag:
88

9+
<Note>
10+
Find the exact snippet needed to load the fonts for your project [here](https://app.subframe.com/library?component=theme&showInstallFontsModal=true).
11+
</Note>
12+
913
```html index.html {2-4}
1014
<head>
1115
<link rel="preconnect" href="https://fonts.googleapis.com"/>
1216
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous"/>
1317
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet"/>
1418
</head>
15-
```
16-
17-
<Note>
18-
Find the exact snippet needed to load the fonts for your project [here](https://app.subframe.com/library?component=theme&showInstallFontsModal=true).
19-
</Note>
19+
```

packages/docs/framework-guides/vite.mdx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Run the following command in the root of your repository to install Subframe and
2525
</CodeGroup>
2626

2727
### Configure Vite to use import aliases
28-
1. Configure the `compilerOptions` in the `tsconfig.app.json` file so Typescript understand your import aliases.
28+
1. Configure the `compilerOptions` in the `tsconfig.app.json` file so Typescript understands your import aliases.
2929

3030
<CodeGroup>
3131
```json tsconfig.app.json {3-8}
@@ -57,24 +57,26 @@ Run the following command in the root of your repository to install Subframe and
5757
"noUnusedLocals": true,
5858
"noUnusedParameters": true,
5959
"noFallthroughCasesInSwitch": true,
60-
"noUncheckedSideEffectImports": true+
60+
"noUncheckedSideEffectImports": true
6161
},
6262
"include": ["src"]
6363
}
6464
```
6565
</CodeGroup>
6666

67-
2. Update `vite.config.ts` so Vite can resolve paths without error:
67+
2. Run `npm install -D @types/node` and then update `vite.config.ts` so Vite can resolve paths without error:
68+
6869
<CodeGroup>
69-
```tsx vite.config.ts {6-10}
70-
import { defineConfig } from 'vite'
71-
import react from '@vitejs/plugin-react'
70+
```tsx vite.config.ts {7-11}
71+
import { defineConfig } from "vite"
72+
import react from "@vitejs/plugin-react"
73+
import { resolve } from "node:path"
7274

7375
export default defineConfig({
7476
plugins: [react()],
7577
resolve: {
7678
alias: {
77-
"@/*": "./src/*"
79+
"@": resolve(__dirname, "./src"),
7880
}
7981
}
8082
})

0 commit comments

Comments
 (0)