Skip to content

Commit fef6139

Browse files
authored
feat: osmium solidbase theme (#1455)
1 parent c296852 commit fef6139

325 files changed

Lines changed: 5095 additions & 12040 deletions

File tree

Some content is hidden

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

.github/workflows/static_checks.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ jobs:
2323
- name: Install tools & dependencies
2424
uses: ./.github/actions/install
2525

26-
- name: Generate virtual modules
27-
run: pnpm sync
28-
2926
- name: TypeScript check
3027
run: pnpm check:types
3128

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignore-workspace-root-check=true
2+
auto-install-peers=false

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Welcome to Solid's documentation!
66

7-
This is the repo for [docs.solidjs.com](https://docs.solidjs.com/). This repo
7+
This is the repo for [docs.solidjs.com](https://docs.solidjs.com/). This repo
88
contains all the source code that we use to build our docs.
99

1010
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/solidjs/solid-docs-next)
@@ -37,9 +37,9 @@ Have you noticed something is missing, confusing, or is wrong in our
3737
documentation?
3838

3939
Check to see if it has
40-
[already been mentioned ](https://github.com/solidjs/solid-docs-next/issues)
40+
[already been mentioned ](https://github.com/solidjs/solid-docs/issues)
4141
and, if not,
42-
[create an issue](https://github.com/solidjs/solid-docs-next/issues/new/choose)
42+
[create an issue](https://github.com/solidjs/solid-docs/issues/new/choose)
4343
to bring it to our attention!
4444

4545
## Share an idea
@@ -51,7 +51,7 @@ Discussion threads are where you can offer feedback on things that might not be
5151
problems that need addressing, but are ideas to be explored.
5252

5353
Join us in the
54-
[Discussions section](https://github.com/solidjs/solid-docs-next/discussions/280)
54+
[Discussions section](https://github.com/solidjs/solid-docs/discussions/280)
5555
where we can brainstorm these ideas, ask questions, and share goals!
5656

5757
## Suggest a fix or contribute
@@ -62,19 +62,19 @@ If you can see what the problem is, and you know how to fix it, you can make a
6262
PR (pull request) with the change and contribute to the docs repo yourself.
6363

6464
If you're looking to make a larger contribution, please see our
65-
[CONTRIBUTING.md](https://github.com/solidjs/solid-docs-next/blob/main/CONTRIBUTING.md)
65+
[CONTRIBUTING.md](https://github.com/solidjs/solid-docs/blob/main/CONTRIBUTING.md)
6666
first!
6767

6868
## Running the Site Locally
6969

7070
At the moment, we recommend running the site locally through either
71-
[CodeSandbox](https://codesandbox.io/p/github/solidjs/solid-docs-next/),
72-
[Gitpod](https://gitpod.io/#https://github.com/solidjs/solid-docs-next), or
73-
[StackBlitz](https://stackblitz.com/github/solidjs/solid-docs-next). These are
71+
[CodeSandbox](https://codesandbox.io/p/github/solidjs/solid-docs/),
72+
[Gitpod](https://gitpod.io/#https://github.com/solidjs/solid-docs), or
73+
[StackBlitz](https://stackblitz.com/github/solidjs/solid-docs). These are
7474
the quickest and easiest way to browse and edit the project files and run the
7575
site locally.
7676

77-
The app uses [pnpm](https://pnpm.io) as the package manager and it runs on Node.js `v18+`.
77+
The app uses [pnpm](https://pnpm.io) as the package manager and it runs on Node.js `v22+`.
7878

7979
Install dependencies:
8080

@@ -90,9 +90,8 @@ pnpm dev
9090

9191
This will start your the app at [localhost:3000](http://localhost:3000) or the next available port.
9292

93-
### Collections and virtual modules
93+
### Framework and Theme
9494

95-
The builds an [Astro](https://docs.astro.build/en/guides/content-collections/) inspired collection navigation, it will bring all routes and generate a couple of files at `/.solid`.
96-
These files are exposed to your app via [Vite virtual modules](https://vitejs.dev/guide/api-plugin#virtual-modules-convention). This task is perform via our `sync` script (`pnpm sync`), ran before every build.
95+
The docs are built on [SolidBase](https://solidbase.dev) and uses the [Osmium Theme](./osmium).
9796

98-
If changes are made to the navigation (new entry, or repositioning entry), it is necessary to restart the server for changes to take effect.
97+
This repo should only contain content as mdx files, features should be implemented upstream and UI changes in the theme.

app.config.ts

Lines changed: 0 additions & 177 deletions
This file was deleted.

env.d.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,3 @@ declare namespace NodeJS {
1616
readonly ORAMA_PRIVATE_API_KEY: string;
1717
}
1818
}
19-
20-
declare module "solid:collection" {
21-
// eslint-disable-next-line
22-
const component: any;
23-
export default component;
24-
}
25-
26-
declare module "solid:hero-code-snippet" {
27-
export const highlightedCode: string;
28-
}

eslint.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default tseslint.config(
4040
rules: {
4141
quotes: ["error", "double"],
4242
semi: "warn",
43+
"@typescript-eslint/no-empty-object-type": ["off"],
4344
"@typescript-eslint/no-unused-vars": [
4445
"error",
4546
{

global.d.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

osmium/package.json

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "solidbase-osmium",
3-
"version": "0.0.0",
3+
"version": "0.0.0-dev",
44
"description": "Official SolidJS docs theme for SolidBase.",
55
"type": "module",
66
"scripts": {
@@ -15,5 +15,36 @@
1515
"solidbase",
1616
"theme"
1717
],
18-
"license": "MIT"
18+
"files": [
19+
"src"
20+
],
21+
"exports": {
22+
".": {
23+
"solid": "./src/index.ts",
24+
"import": "./src/index.ts",
25+
"types": "./src/index.ts"
26+
},
27+
"./style": "./src/index.css"
28+
},
29+
"license": "MIT",
30+
"dependencies": {
31+
"@fontsource-variable/geist": "^5.2.8",
32+
"@fontsource-variable/geist-mono": "^5.2.7",
33+
"@kobalte/core": "^0.13.11",
34+
"@kobalte/solidbase": "catalog:",
35+
"@orama/core": "^1.2.19",
36+
"@solid-primitives/context": "^0.3.2",
37+
"@solid-primitives/event-listener": "^2.4.5",
38+
"@solid-primitives/marker": "^0.2.2",
39+
"@solid-primitives/platform": "^0.2.1",
40+
"@solidjs/router": "0.15.3",
41+
"solid-heroicons": "^3.2.4",
42+
"solid-js": "^1.9.11",
43+
"tailwindcss": "^4.2.2",
44+
"@kobalte/tailwindcss": "^0.9.0",
45+
"@tailwindcss/typography": "^0.5.19"
46+
},
47+
"peerDependencies": {
48+
"tailwindcss": "^4.2.2"
49+
}
1950
}

osmium/src/Layout.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { ErrorBoundary } from "solid-js";
2+
3+
import { Layout } from "./ui/layout";
4+
import { NotFound } from "./ui/not-found";
5+
import { SidebarProvider, useThemeListener } from "@kobalte/solidbase/client";
6+
import { usePace } from "@kobalte/solidbase/default-theme/pace.js";
7+
import { useRouteConfig } from "./utils";
8+
import { OsmiumThemeStateProvider } from "./context";
9+
import { ParentProps } from "solid-js";
10+
11+
export default function (props: ParentProps) {
12+
const config = useRouteConfig();
13+
useThemeListener();
14+
usePace();
15+
16+
return (
17+
<OsmiumThemeStateProvider>
18+
<SidebarProvider config={config().themeConfig?.sidebar}>
19+
<ErrorBoundary fallback={() => <NotFound />}>
20+
<Layout>{props.children}</Layout>
21+
</ErrorBoundary>
22+
</SidebarProvider>
23+
</OsmiumThemeStateProvider>
24+
);
25+
}

0 commit comments

Comments
 (0)