Skip to content

Commit 711a6d8

Browse files
committed
chore: move to pre-rendered pages
1 parent b561914 commit 711a6d8

28 files changed

+4400
-198
lines changed

.github/workflows/docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Docs
2+
on:
3+
push:
4+
branches: [main]
5+
6+
permissions:
7+
contents: write
8+
9+
jobs:
10+
build-docs:
11+
concurrency: ci-${{ github.ref }}
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout 🛎️
15+
uses: actions/checkout@v3
16+
17+
- name: Node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "20"
21+
22+
- uses: pnpm/action-setup@v4
23+
with:
24+
version: 9.9.0
25+
26+
- name: Install and Build
27+
run: |
28+
pnpm i --frozen-lockfile
29+
pnpm build
30+
31+
- name: Deploy 🚀
32+
uses: JamesIves/github-pages-deploy-action@v4
33+
with:
34+
branch: gh-pages
35+
folder: dist

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

LICENSE

Lines changed: 661 additions & 0 deletions
Large diffs are not rendered by default.

index.html

Lines changed: 5 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,12 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
56
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>PreachJS</title>
7+
<title>PreachJS | Tiny preact libraries</title>
78
</head>
8-
<body class="!block" style="display: none">
9-
<div class="mx-auto max-w-4xl p-2">
10-
<header class="flex flex-col justify-center h-[400px]">
11-
<h1 class="font-semibold text-2xl">PreachJS</h1>
12-
<p>
13-
<small>We make tiny things</small>
14-
</p>
15-
</header>
16-
<main class="flex gap-10">
17-
<aside id="sidebar" class="flex-1 text-sm"></aside>
18-
<article id="article" class="flex-2 prose text-zinc-700"></article>
19-
</main>
20-
</div>
21-
22-
<script type="importmap">
23-
{
24-
"imports": {
25-
"@twind/core": "https://ga.jspm.io/npm:@twind/[email protected]/core.js",
26-
"@twind/preset-autoprefix": "https://ga.jspm.io/npm:@twind/[email protected]/preset-autoprefix.js",
27-
"@twind/preset-tailwind": "https://ga.jspm.io/npm:@twind/[email protected]/preset-tailwind.js",
28-
"@twind/preset-typography": "https://ga.jspm.io/npm:@twind/[email protected]/preset-typography.js",
29-
"htm": "https://ga.jspm.io/npm:[email protected]/dist/htm.module.js",
30-
"htm/preact": "https://ga.jspm.io/npm:[email protected]/preact/index.module.js",
31-
"marked": "https://ga.jspm.io/npm:[email protected]/lib/marked.esm.js",
32-
"preact": "https://ga.jspm.io/npm:[email protected]/dist/preact.module.js",
33-
"preact/hooks": "https://ga.jspm.io/npm:[email protected]/hooks/dist/hooks.module.js"
34-
},
35-
"scopes": {
36-
"https://ga.jspm.io/": {
37-
"style-vendorizer": "https://ga.jspm.io/npm:[email protected]/dist/esm/bundle.min.mjs",
38-
"preact": "https://ga.jspm.io/npm:[email protected]/dist/preact.module.js"
39-
}
40-
}
41-
}
42-
</script>
43-
<script
44-
async
45-
src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js"
46-
crossorigin="anonymous"
47-
></script>
48-
<script type="module" src="/styles.js"></script>
49-
<script type="module" src="/main.js"></script>
9+
<body>
10+
<div id="app"></div>
11+
<script prerender type="module" src="/src/main.jsx"></script>
5012
</body>
5113
</html>

main.js

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

package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "doc-press-vite-preact",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vite build",
9+
"preview": "vite preview"
10+
},
11+
"dependencies": {
12+
"preact": "^10.25.3",
13+
"preact-async-route": "^2.2.1",
14+
"preact-iso": "^2.8.1",
15+
"preact-router": "^4.1.2"
16+
},
17+
"devDependencies": {
18+
"@mdx-js/mdx": "^3.1.0",
19+
"@mdx-js/preact": "^3.1.0",
20+
"@mdx-js/rollup": "^3.1.0",
21+
"@preact/preset-vite": "^2.9.3",
22+
"@tailwindcss/typography": "^0.5.15",
23+
"autoprefixer": "^10.4.20",
24+
"tailwindcss": "^3.4.17",
25+
"vite": "^6.0.5",
26+
"vite-plugin-mdx": "^3.6.1"
27+
}
28+
}

0 commit comments

Comments
 (0)