Skip to content

Commit af4632b

Browse files
committed
feat: migrate to astro
1 parent 900af6b commit af4632b

40 files changed

+5771
-6535
lines changed

.eslintrc.json

-14
This file was deleted.

.vscode/settings.json

+30-19
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,39 @@
11
{
2-
"editor.formatOnSave": false,
3-
"eslint.validate": [
4-
"javascript",
5-
"typescript",
6-
"javascriptreact",
7-
"typescriptreact",
8-
"vue",
9-
"yaml",
10-
"html",
11-
"markdown",
12-
"json",
13-
"jsonc",
14-
"json5"
15-
],
2+
"editor.formatOnSave": true,
3+
"eslint.enable": false,
164
"[typescript]": {
17-
"editor.formatOnSave": false
18-
},
19-
"[javascript]": {
20-
"editor.formatOnSave": false
5+
"editor.formatOnSave": true
216
},
227
"[html]": {
238
"editor.formatOnSave": false
249
},
2510
"[markdown]": {
2611
"editor.formatOnSave": false
27-
}
12+
},
13+
"prettier.documentSelectors": ["**/*.astro"],
14+
"[astro]": {
15+
"editor.formatOnSave": true,
16+
"editor.defaultFormatter": "esbenp.prettier-vscode"
17+
},
18+
"prettier.requireConfig": true,
19+
"cSpell.allowCompoundWords": true,
20+
"cSpell.words": [
21+
"amap",
22+
"antfu",
23+
"astrojs",
24+
"attributify",
25+
"bilibili",
26+
"bumpp",
27+
"changelogithub",
28+
"destructurable",
29+
"iconify",
30+
"pnpm",
31+
"shiki",
32+
"unocss",
33+
"unplugin",
34+
"vite",
35+
"vitejs",
36+
"vitesse",
37+
"vueuse"
38+
]
2839
}

astro.config.mjs

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { defineConfig } from 'astro/config'
2+
import sitemap from '@astrojs/sitemap'
3+
import mdx from '@astrojs/mdx'
4+
import image from '@astrojs/image'
5+
6+
export default defineConfig({
7+
site: `https://ntnyq.com`,
8+
9+
server: {
10+
open: true,
11+
host: true,
12+
},
13+
14+
integrations: [
15+
sitemap(),
16+
mdx(),
17+
image({
18+
serviceEntryPoint: '@astrojs/image/sharp',
19+
}),
20+
],
21+
22+
markdown: {
23+
shikiConfig: {
24+
theme: {
25+
light: `vitesse-light`,
26+
dark: `vitesse-dark`,
27+
},
28+
},
29+
},
30+
})

cspell.json

-37
This file was deleted.

index.html

-33
This file was deleted.

package.json

+20-30
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,46 @@
99
"email": "[email protected]"
1010
},
1111
"scripts": {
12-
"build": "vite-ssg build",
13-
"dev": "vite",
14-
"lint": "run-p lint:*",
15-
"lint:script": "eslint .",
12+
"build": "astro build",
13+
"check": "astro check",
14+
"dev": "astro dev",
15+
"fmt": "prettier -w .",
16+
"fmt:check": "prettier --check .",
1617
"prepare": "husky install",
18+
"preview": "astro preview",
1719
"release": "bumpp"
1820
},
1921
"dependencies": {
20-
"@gtm-support/vue-gtm": "^2.0.0",
21-
"@vueuse/core": "^9.10.0",
22-
"@vueuse/head": "^1.0.22",
23-
"nprogress": "^0.2.0",
24-
"vue": "^3.2.45",
25-
"vue-router": "^4.1.6"
22+
"@astrojs/image": "^0.12.1",
23+
"@astrojs/mdx": "^0.14.0",
24+
"@astrojs/partytown": "^1.0.2",
25+
"@astrojs/rss": "^2.0.0",
26+
"@astrojs/sitemap": "^1.0.0",
27+
"astro": "^1.9.2",
28+
"nprogress": "^0.2.0"
2629
},
2730
"devDependencies": {
2831
"@iconify/json": "^2.2.7",
29-
"@ntnyq/eslint-config": "^1.2.2",
30-
"@octokit/rest": "^19.0.5",
32+
"@ntnyq/prettier-config": "^1.2.2",
3133
"@types/fs-extra": "^11.0.1",
32-
"@types/markdown-it": "^12.2.3",
3334
"@types/node": "18.11.18",
3435
"@types/nprogress": "^0.2.0",
3536
"@unocss/reset": "^0.48.4",
36-
"@vitejs/plugin-vue": "^4.0.0",
37-
"@vue/server-renderer": "^3.2.45",
3837
"dayjs": "^1.11.7",
39-
"eslint": "^8.32.0",
4038
"fs-extra": "^11.1.0",
41-
"gray-matter": "^4.0.3",
4239
"husky": "^8.0.3",
43-
"markdown-it": "^13.0.1",
44-
"markdown-it-shiki": "^0.7.2",
4540
"nano-staged": "^0.8.0",
4641
"npm-run-all": "^4.1.5",
4742
"pnpm": "^7.25.0",
43+
"prettier": "^2.8.3",
44+
"prettier-plugin-astro": "^0.7.2",
45+
"rollup": "^3.10.0",
46+
"sharp": "^0.31.3",
4847
"typescript": "^4.9.4",
4948
"unocss": "^0.48.4",
50-
"unplugin-auto-import": "^0.12.1",
51-
"unplugin-icons": "^0.15.1",
52-
"unplugin-vue-components": "^0.22.12",
53-
"vite": "^4.0.4",
54-
"vite-plugin-pages": "^0.28.0",
55-
"vite-plugin-pwa": "^0.14.1",
56-
"vite-plugin-vue-markdown": "^0.22.2",
57-
"vite-ssg": "^0.22.1",
58-
"vite-ssg-sitemap": "^0.4.3",
59-
"workbox-window": "^6.5.4"
49+
"vite": "^4.0.4"
6050
},
6151
"nano-staged": {
62-
"*.{js,ts,vue,yml,yaml,json,md}": "eslint --fix"
52+
"*.{js,ts,vue,yml,yaml,json,md}": "prettier --write"
6353
}
6454
}

pages/index.md

-14
This file was deleted.

pages/posts/index.md

-1
This file was deleted.

0 commit comments

Comments
 (0)