Skip to content

Commit 4346945

Browse files
Merge branch 'main' into use-consistent-term-for-tracking-scope
2 parents 5c04319 + 58ef728 commit 4346945

File tree

144 files changed

+4736
-4553
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+4736
-4553
lines changed

.github/actions/install/action.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Install Tools & Dependencies
2+
description: Installs pnpm, Node.js & package dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup pnpm
8+
uses: pnpm/action-setup@v4
9+
with:
10+
version: 9
11+
run_install: false
12+
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
cache: pnpm
18+
19+
- name: Install dependencies
20+
run: pnpm install
21+
shell: bash

.github/workflows/orama_sync.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,12 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: Checkout repository
15+
- name: Check out code
1616
uses: actions/checkout@v4
17-
- uses: pnpm/action-setup@v3
18-
with:
19-
version: 8
20-
- name: Setup Node.js
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version: 20.x
24-
cache: pnpm
25-
- name: Install dependencies
26-
run: pnpm i
17+
18+
- name: Install tools & dependencies
19+
uses: ./.github/actions/install
20+
2721
- name: Sync Orama
2822
run: pnpm sync:orama
2923
env:

.github/workflows/static_checks.yml

Lines changed: 19 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,37 @@ name: 🔍 Lint / Type Checks
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
7+
68
pull_request:
7-
branches: [main]
9+
branches:
10+
- main
811

912
jobs:
10-
setup:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
- uses: pnpm/action-setup@v4
15-
with:
16-
version: 9
17-
- uses: actions/setup-node@v4
18-
with:
19-
node-version: "20"
20-
cache: "pnpm"
21-
- run: pnpm i
22-
- uses: actions/cache/save@v4
23-
with:
24-
path: |
25-
node_modules
26-
~/.pnpm-store
27-
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
28-
2913
typecheck:
30-
needs: setup
3114
runs-on: ubuntu-latest
3215
steps:
33-
- uses: actions/checkout@v4
34-
- uses: pnpm/action-setup@v4
35-
with:
36-
version: 9
37-
- uses: actions/setup-node@v4
38-
with:
39-
node-version: "20"
40-
cache: "pnpm"
41-
- uses: actions/cache/restore@v4
42-
with:
43-
path: |
44-
node_modules
45-
~/.pnpm-store
46-
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
16+
- name: Check out code
17+
uses: actions/checkout@v4
18+
19+
- name: Install tools & dependencies
20+
uses: ./.github/actions/install
21+
4722
- name: Generate virtual modules
4823
run: pnpm sync
24+
4925
- name: TypeScript check
5026
run: pnpm check:types
5127

5228
lint:
53-
needs: setup
5429
runs-on: ubuntu-latest
5530
steps:
56-
- uses: actions/checkout@v4
57-
- uses: pnpm/action-setup@v4
58-
with:
59-
version: 9
60-
- uses: actions/setup-node@v4
61-
with:
62-
node-version: "20"
63-
cache: "pnpm"
64-
- uses: actions/cache/restore@v4
65-
with:
66-
path: |
67-
node_modules
68-
~/.pnpm-store
69-
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
70-
- name: ESLint check
31+
- name: Check out code
32+
uses: actions/checkout@v4
33+
34+
- name: Install tools & dependencies
35+
uses: ./.github/actions/install
36+
37+
- name: Lint code
7138
run: pnpm check:lint

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ netlify
4747
.vinxi
4848

4949
public/sitemap.xml
50-
public/i18n-status
50+
public/i18n-status

WRITING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ We ask that you use them sparingly.
6666
3. Once you have the Aside component imported, simply follow the below example for how to add one to your document.
6767

6868
```
69-
<Callout>
69+
:::info
7070
content here
71-
</Callout>
71+
:::
7272
```
7373

7474
### Code examples

app.config.ts

Lines changed: 124 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
import { defineConfig } from "@solidjs/start/config";
2-
import remarkFrontmatter from "remark-frontmatter";
3-
import rehypeRaw from "rehype-raw";
4-
import { nodeTypes } from "@mdx-js/mdx";
5-
import remarkGfm from "remark-gfm";
6-
import remarkExpressiveCode, {
7-
ExpressiveCodeTheme,
8-
} from "remark-expressive-code";
9-
import rehypeSlug from "rehype-slug";
10-
import rehypeAutoLinkHeadings from "rehype-autolink-headings";
112

12-
// @ts-expect-error missing types
13-
import pkg from "@vinxi/plugin-mdx";
3+
import { createWithSolidBase, defineTheme } from "@kobalte/solidbase/config";
144

15-
const { default: vinxiMdx } = pkg;
165
import tree from "./.solid/tree";
176
import entries from "./.solid/flat-entries";
187
import solidstartEntries from "./.solid/solid-start-flat-entries";
@@ -27,7 +16,7 @@ function docsData() {
2716
const resolveVirtualModuleId = "\0" + virtualModuleId;
2817

2918
return {
30-
name: "solid:collection",
19+
name: virtualModuleId,
3120
resolveId(id: string) {
3221
if (id === virtualModuleId) {
3322
return resolveVirtualModuleId;
@@ -50,61 +39,130 @@ function docsData() {
5039
};
5140
}
5241

53-
export default defineConfig({
54-
middleware: "src/middleware/index.ts",
55-
server: {
56-
preset: "netlify",
57-
prerender: {
58-
crawlLinks: true,
59-
autoSubfolderIndex: false,
60-
failOnError: true,
61-
// eslint-disable-next-line no-useless-escape
62-
ignore: [/\{\getPath}/, /.*?emojiSvg\(.*/],
42+
const theme = defineTheme({
43+
componentsPath: import.meta.resolve("./src/solidbase-theme"),
44+
});
45+
export default defineConfig(
46+
createWithSolidBase(theme)(
47+
{
48+
ssr: true,
49+
middleware: "src/middleware/index.ts",
50+
server: {
51+
preset: "netlify",
52+
prerender: {
53+
crawlLinks: true,
54+
autoSubfolderIndex: false,
55+
failOnError: true,
56+
// eslint-disable-next-line no-useless-escape
57+
ignore: [/\{\getPath}/, /.*?emojiSvg\(.*/],
58+
},
59+
},
60+
vite: {
61+
plugins: [docsData(), heroCodeSnippet()],
62+
},
6363
},
64-
},
65-
extensions: ["mdx", "md", "tsx"],
66-
vite: () => ({
67-
plugins: [
68-
docsData(),
69-
vinxiMdx.withImports({})({
70-
define: {
71-
"import.meta.env": "'import.meta.env'",
64+
{
65+
title: "Solid Docs",
66+
description:
67+
"Documentation for SolidJS, the signals-powered UI framework",
68+
editPath: "https://github.com/solidjs/solid-docs/edit/main/:path",
69+
markdown: {
70+
expressiveCode: {
71+
themes: ["min-light", "material-theme-ocean"],
72+
themeCssSelector: (theme) => `[data-theme="${theme.type}"]`,
73+
frames: false,
74+
styleOverrides: {
75+
twoSlash: {
76+
cursorColor: "var(--twoslash-cursor)",
77+
},
78+
},
79+
twoSlash: false,
80+
},
81+
toc: {
82+
minDepth: 2,
7283
},
73-
jsx: true,
74-
jsxImportSource: "solid-js",
75-
providerImportSource: "solid-mdx",
76-
rehypePlugins: [
77-
[
78-
rehypeRaw,
79-
{
80-
passThrough: nodeTypes,
84+
packageManagers: {
85+
presets: {
86+
npm: {
87+
install: "npm i :content",
88+
"install-dev": "npm i :content -D",
89+
"install-global": "npm i :content -g",
90+
"install-local": "npm i",
91+
run: "npm run :content",
92+
exec: "npx :content",
93+
create: "npm init :content",
8194
},
82-
],
83-
[rehypeSlug],
84-
[
85-
rehypeAutoLinkHeadings,
86-
{
87-
behavior: "wrap",
88-
properties: {
89-
className: "heading",
90-
},
95+
pnpm: {
96+
install: "pnpm i :content",
97+
"install-dev": "pnpm i :content -D",
98+
"install-global": "pnpm i :content -g",
99+
"install-local": "pnpm i",
100+
run: "pnpm :content",
101+
exec: "pnpx :content",
102+
create: "pnpm create :content",
91103
},
92-
],
93-
],
94-
remarkPlugins: [
95-
remarkFrontmatter,
96-
remarkGfm,
97-
[
98-
remarkExpressiveCode,
99-
{
100-
themes: ["min-light", "material-theme-ocean"],
101-
themeCSSSelector: (theme: ExpressiveCodeTheme) =>
102-
`[data-theme="${theme.name}"]`,
104+
yarn: {
105+
install: "yarn add :content",
106+
"install-dev": "yarn add :content -D",
107+
"install-global": "yarn add :content -g",
108+
"install-local": "yarn i",
109+
run: "yarn :content",
110+
exec: "yarn dlx :content",
111+
create: "yarn create :content",
103112
},
104-
],
105-
],
106-
}),
107-
{ enforce: "pre" },
108-
],
109-
}),
110-
});
113+
bun: {
114+
install: "bun i :content",
115+
"install-dev": "bun i :content -d",
116+
"install-global": "bun i :content -g",
117+
"install-local": "bun i",
118+
run: "bun run :content",
119+
exec: "bunx :content",
120+
create: "bun create :content",
121+
},
122+
deno: {
123+
install: "deno add npm::content",
124+
"install-dev": "deno add npm::content -D",
125+
"install-global": "deno add npm::content -g",
126+
"install-local": "deno i",
127+
run: "deno run :content",
128+
exec: "dpx :content",
129+
create: "deno run -A npm:create-:content",
130+
},
131+
},
132+
},
133+
},
134+
}
135+
)
136+
);
137+
138+
import { readFile } from "node:fs/promises";
139+
import { codeToHtml } from "shiki";
140+
141+
function heroCodeSnippet() {
142+
const virtualModuleId = "solid:hero-code-snippet";
143+
const resolveVirtualModuleId = "\0" + virtualModuleId;
144+
145+
return {
146+
name: virtualModuleId,
147+
resolveId(id: string) {
148+
if (id === virtualModuleId) {
149+
return resolveVirtualModuleId;
150+
}
151+
},
152+
async load(id: string) {
153+
if (id === resolveVirtualModuleId) {
154+
const snippet = await readFile(
155+
"./src/ui/layout/hero-code-snippet.code",
156+
"utf-8"
157+
);
158+
159+
const highlightedCode = await codeToHtml(snippet.trim(), {
160+
lang: "tsx",
161+
theme: "material-theme-ocean",
162+
});
163+
164+
return `export const highlightedCode = \`${highlightedCode}\``;
165+
}
166+
},
167+
};
168+
}

env.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ declare module "solid:collection" {
2020
const component: any;
2121
export default component;
2222
}
23+
24+
declare module "solid:hero-code-snippet" {
25+
export const highlightedCode: string;
26+
}

0 commit comments

Comments
 (0)