Skip to content

Commit

Permalink
fix ci/cd & update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Moroshima committed Nov 9, 2023
1 parent bab0904 commit 46af480
Show file tree
Hide file tree
Showing 17 changed files with 1,166 additions and 955 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
version: latest
- run: pnpm install
- run: pnpm run build && pnpm run export
- run: pnpm build
- uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

# production
/build
/public/robots.txt
/public/rss.xml
/public/sitemap.xml

# misc
.DS_Store
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Hello New World

作为前端开发者,我无法忍受自己的博客是运行在像 EJS (Hexo) 甚至PHP (WordPress) 这样简陋不堪或是性能极其糟糕的技术之上的。因此我选择了 Next.js 作为博客系统的基础框架,自行开发全新的博客系统。好消息是,这使得我可以彻底告别 Hexo/Hugo 或是 React 生态下那些繁复臃肿不堪的 UI 组件库,除了React,我不再需要与前端生态那些既成的老古董打交道。相对应的,在本项目的开发中我自然投入更多的学习与开发成本,但这也是值得的。
作为前端开发者,我无法忍受自己的博客是运行在像 EJS (Hexo) 甚至 PHP (WordPress) 这样简陋不堪或是性能极其糟糕的技术之上的。因此我选择了 Next.js 作为博客系统的基础框架,自行开发全新的博客系统。好消息是,这使得我可以彻底告别 Hexo/Hugo 或是 React 生态下那些繁复臃肿不堪的 UI 组件库,除了 React,我不再需要与前端生态那些既成的老古董打交道。相对应的,在本项目的开发中我自然投入更多的学习与开发成本,但这也是值得的。

欢迎来到属于「夕凪」与 Next.js 的新世界!

Expand Down Expand Up @@ -55,6 +55,8 @@
- [x] Mermaid 支持
- [x] 文档内联 HTML 代码支持
- [ ] 打印友好适配
- [ ] 暗色模式适配
- [ ] 代码中全部使用单引号替换原有双引号以便与 Next.js 官方写法保持一致

### 已知问题

Expand Down Expand Up @@ -178,7 +180,7 @@ pnpm build && pnpm export
"date": "1970-01-01T00:00:00",
"updated": "文章最后修改时间(未修改则与 date 字段填写相同时间或直接填写为 null)",
"categories": ["分类"],
"description": "文章描述",
"description": "文章描述"
}
]
```
Expand Down
10 changes: 6 additions & 4 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import remarkGfm from "remark-gfm";
import remarkMath from "remark-math";
import rehypeRaw from "rehype-raw";
import rehypeKatex from "rehype-katex";
import rehypeMermaid from "rehype-mermaidjs";
import rehypeMermaid from "rehype-mermaid";
import rehypePrism from "rehype-prism-plus";
import rehypeToc from "rehype-toc";
import rehypeSlug from "rehype-slug";
Expand All @@ -13,6 +13,7 @@ import { visit } from "unist-util-visit";

/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
// Configure pageExtensions to include md and mdx
pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"],
// Optionally, add any other Next.js config below
Expand Down Expand Up @@ -44,9 +45,10 @@ export default withMDX({
rehypeMermaid,
{
launchOptions: {
executablePath: process.platform === "darwin"
? "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" // for my macOS device
: "/opt/google/chrome/google-chrome", // for GitHub Actions Ubuntu
executablePath:
process.platform === "darwin"
? "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" // for my macOS device
: "/opt/google/chrome/google-chrome", // for GitHub Actions Ubuntu
},
},
],
Expand Down
39 changes: 21 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,44 @@
"build": "next build",
"postbuild": "next-sitemap",
"start": "next start",
"lint": "next lint",
"export": "next export"
"lint": "next lint"
},
"dependencies": {
"@fontsource-variable/eb-garamond": "^5.0.16",
"@fontsource/allison": "^5.0.17",
"@fontsource/ms-madi": "^5.0.8",
"@fontsource/noto-serif-sc": "^5.0.7",
"@giscus/react": "^2.3.0",
"@mdx-js/loader": "^2.3.0",
"@mdx-js/react": "^2.3.0",
"@next/mdx": "13.5.4",
"@mdx-js/loader": "^3.0.0",
"@mdx-js/react": "^3.0.0",
"@next/mdx": "14.0.1",
"@primer/octicons-react": "^19.8.0",
"markdown-it": "^13.0.2",
"next": "13.5.4",
"next": "14.0.1",
"next-sitemap": "^4.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rehype-autolink-headings": "^7.0.0",
"rehype-autolink-headings": "^7.1.0",
"rehype-katex": "^7.0.0",
"rehype-mermaidjs": "^2.0.0",
"rehype-mermaid": "^2.0.1",
"rehype-prism-plus": "^1.6.3",
"rehype-raw": "^7.0.0",
"rehype-slug": "^6.0.0",
"rehype-toc": "^3.0.2",
"remark-gfm": "^3.0.1",
"remark-math": "^5.1.1",
"remark-gfm": "^4.0.0",
"remark-math": "^6.0.0",
"rss": "^1.2.2",
"unist-util-visit": "^5.0.0"
},
"devDependencies": {
"@types/markdown-it": "^13.0.2",
"@types/node": "^20.8.4",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@types/rss": "^0.0.30",
"eslint": "^8.51.0",
"eslint-config-next": "13.5.4",
"sass": "^1.69.2",
"@types/markdown-it": "^13.0.6",
"@types/node": "^20.9.0",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@types/rss": "^0.0.32",
"eslint": "^8.53.0",
"eslint-config-next": "14.0.1",
"sass": "^1.69.5",
"typescript": "^5.2.2"
}
}
Loading

0 comments on commit 46af480

Please sign in to comment.