Skip to content

Commit

Permalink
feat: migrate to astro
Browse files Browse the repository at this point in the history
  • Loading branch information
ntnyq committed Mar 2, 2023
1 parent 900af6b commit af4632b
Show file tree
Hide file tree
Showing 40 changed files with 5,771 additions and 6,535 deletions.
14 changes: 0 additions & 14 deletions .eslintrc.json

This file was deleted.

49 changes: 30 additions & 19 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
{
"editor.formatOnSave": false,
"eslint.validate": [
"javascript",
"typescript",
"javascriptreact",
"typescriptreact",
"vue",
"yaml",
"html",
"markdown",
"json",
"jsonc",
"json5"
],
"editor.formatOnSave": true,
"eslint.enable": false,
"[typescript]": {
"editor.formatOnSave": false
},
"[javascript]": {
"editor.formatOnSave": false
"editor.formatOnSave": true
},
"[html]": {
"editor.formatOnSave": false
},
"[markdown]": {
"editor.formatOnSave": false
}
},
"prettier.documentSelectors": ["**/*.astro"],
"[astro]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.requireConfig": true,
"cSpell.allowCompoundWords": true,
"cSpell.words": [
"amap",
"antfu",
"astrojs",
"attributify",
"bilibili",
"bumpp",
"changelogithub",
"destructurable",
"iconify",
"pnpm",
"shiki",
"unocss",
"unplugin",
"vite",
"vitejs",
"vitesse",
"vueuse"
]
}
30 changes: 30 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { defineConfig } from 'astro/config'
import sitemap from '@astrojs/sitemap'
import mdx from '@astrojs/mdx'
import image from '@astrojs/image'

export default defineConfig({
site: `https://ntnyq.com`,

server: {
open: true,
host: true,
},

integrations: [
sitemap(),
mdx(),
image({
serviceEntryPoint: '@astrojs/image/sharp',
}),
],

markdown: {
shikiConfig: {
theme: {
light: `vitesse-light`,
dark: `vitesse-dark`,
},
},
},
})
37 changes: 0 additions & 37 deletions cspell.json

This file was deleted.

33 changes: 0 additions & 33 deletions index.html

This file was deleted.

50 changes: 20 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,56 +9,46 @@
"email": "ntnyq13@gmail.com"
},
"scripts": {
"build": "vite-ssg build",
"dev": "vite",
"lint": "run-p lint:*",
"lint:script": "eslint .",
"build": "astro build",
"check": "astro check",
"dev": "astro dev",
"fmt": "prettier -w .",
"fmt:check": "prettier --check .",
"prepare": "husky install",
"preview": "astro preview",
"release": "bumpp"
},
"dependencies": {
"@gtm-support/vue-gtm": "^2.0.0",
"@vueuse/core": "^9.10.0",
"@vueuse/head": "^1.0.22",
"nprogress": "^0.2.0",
"vue": "^3.2.45",
"vue-router": "^4.1.6"
"@astrojs/image": "^0.12.1",
"@astrojs/mdx": "^0.14.0",
"@astrojs/partytown": "^1.0.2",
"@astrojs/rss": "^2.0.0",
"@astrojs/sitemap": "^1.0.0",
"astro": "^1.9.2",
"nprogress": "^0.2.0"
},
"devDependencies": {
"@iconify/json": "^2.2.7",
"@ntnyq/eslint-config": "^1.2.2",
"@octokit/rest": "^19.0.5",
"@ntnyq/prettier-config": "^1.2.2",
"@types/fs-extra": "^11.0.1",
"@types/markdown-it": "^12.2.3",
"@types/node": "18.11.18",
"@types/nprogress": "^0.2.0",
"@unocss/reset": "^0.48.4",
"@vitejs/plugin-vue": "^4.0.0",
"@vue/server-renderer": "^3.2.45",
"dayjs": "^1.11.7",
"eslint": "^8.32.0",
"fs-extra": "^11.1.0",
"gray-matter": "^4.0.3",
"husky": "^8.0.3",
"markdown-it": "^13.0.1",
"markdown-it-shiki": "^0.7.2",
"nano-staged": "^0.8.0",
"npm-run-all": "^4.1.5",
"pnpm": "^7.25.0",
"prettier": "^2.8.3",
"prettier-plugin-astro": "^0.7.2",
"rollup": "^3.10.0",
"sharp": "^0.31.3",
"typescript": "^4.9.4",
"unocss": "^0.48.4",
"unplugin-auto-import": "^0.12.1",
"unplugin-icons": "^0.15.1",
"unplugin-vue-components": "^0.22.12",
"vite": "^4.0.4",
"vite-plugin-pages": "^0.28.0",
"vite-plugin-pwa": "^0.14.1",
"vite-plugin-vue-markdown": "^0.22.2",
"vite-ssg": "^0.22.1",
"vite-ssg-sitemap": "^0.4.3",
"workbox-window": "^6.5.4"
"vite": "^4.0.4"
},
"nano-staged": {
"*.{js,ts,vue,yml,yaml,json,md}": "eslint --fix"
"*.{js,ts,vue,yml,yaml,json,md}": "prettier --write"
}
}
14 changes: 0 additions & 14 deletions pages/index.md

This file was deleted.

1 change: 0 additions & 1 deletion pages/posts/index.md

This file was deleted.

0 comments on commit af4632b

Please sign in to comment.