Skip to content

Commit 342f419

Browse files
committed
chore: update posts to adapt the new version of geist
1 parent 21cb30d commit 342f419

19 files changed

+613
-1465
lines changed

lib/components/layout.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,17 @@ const Layout: React.FC<React.PropsWithChildren<LayoutProps>> = ({
106106
107107
.container :global(h2) {
108108
font-size: 1.7rem;
109+
margin-top: 2.25rem;
109110
}
110111
111112
.container :global(h3) {
112113
font-size: 1.4rem;
114+
margin-top: 1rem;
113115
}
114116
115117
.container :global(h4) {
116118
font-size: 1.2rem;
119+
margin-top: 1rem;
117120
}
118121
119122
@media only screen and (max-width: 767px) {

next.config.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,12 @@ const withMDX = require('@next/mdx')({
1515
const nextConfig = {
1616
pageExtensions: ['jsx', 'js', 'mdx', 'md', 'ts', 'tsx'],
1717

18-
cssModules: true,
19-
2018
generateEtags: false,
2119

2220
poweredByHeader: false,
2321

2422
assetPrefix: isProd ? cdnPrefix : '',
2523

26-
cssLoaderOptions: {
27-
importLoaders: 1,
28-
localIdentName: '[local]___[hash:base64:5]',
29-
},
30-
3124
env: {
3225
VERSION: require('./package.json').version,
3326
},

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@geist-ui/core": "^2.3.4",
1616
"@geist-ui/icons": "^1.0.1",
1717
"@geist-ui/prism": "^1.1.1",
18-
"@mdx-js/react": "^2.0.0",
18+
"@mdx-js/react": "^1.6.22",
1919
"@unix/views": "^0.2.0",
2020
"ms": "^2.1.3",
2121
"next": "^12.1.0",
@@ -25,7 +25,7 @@
2525
"devDependencies": {
2626
"@geist-ui/prettier-config": "^1.0.1",
2727
"@mapbox/rehype-prism": "^0.7.0",
28-
"@mdx-js/loader": "^2.0.0",
28+
"@mdx-js/loader": "^1.6.22",
2929
"@next/mdx": "^12.1.0",
3030
"@types/ms": "^0.7.31",
3131
"@types/react": "^17.0.39",

pages/_app.tsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { getDNSPrefetchValue } from 'lib/data-transform'
1111
import { BlogConfigsProvider } from 'lib/components'
1212
import { HybridLink, HybridCode } from 'lib/components/mdx'
1313

14-
const Application: NextPage<AppProps<{}>> = ({ Component, pageProps }) => {
14+
const Application: NextPage<AppProps<unknown>> = ({ Component, pageProps }) => {
1515
const [themeType, setThemeType] = useState('light')
1616
const domain = useMemo(() => getDNSPrefetchValue(BLOG.domain), [])
1717
const changeHandle = useCallback(isDark => {
@@ -21,8 +21,7 @@ const Application: NextPage<AppProps<{}>> = ({ Component, pageProps }) => {
2121

2222
useEffect(() => {
2323
if (typeof localStorage !== 'object') return
24-
const themeType = localStorage.getItem('theme')
25-
setThemeType(themeType === 'dark' ? 'dark' : 'light')
24+
setThemeType(localStorage.getItem('theme') === 'dark' ? 'dark' : 'light')
2625
}, [])
2726
useEffect(() => localStorage.setItem('theme', themeType), [themeType])
2827
useDomClean()
@@ -59,16 +58,16 @@ const Application: NextPage<AppProps<{}>> = ({ Component, pageProps }) => {
5958
<GeistProvider themeType={themeType}>
6059
<CssBaseline />
6160
<PrismBaseline />
62-
<BlogConfigsProvider onChange={changeHandle}>
63-
<MDXProvider
64-
components={{
65-
a: HybridLink,
66-
img: Image,
67-
pre: HybridCode,
68-
}}>
61+
<MDXProvider
62+
components={{
63+
a: HybridLink,
64+
img: Image,
65+
pre: HybridCode,
66+
}}>
67+
<BlogConfigsProvider onChange={changeHandle}>
6968
<Component {...pageProps} />
70-
</MDXProvider>
71-
</BlogConfigsProvider>
69+
</BlogConfigsProvider>
70+
</MDXProvider>
7271
<style global jsx>{`
7372
@media only screen and (max-width: 767px) {
7473
html {

pages/fixed/about.mdx

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,20 @@
11
import { Layout } from 'lib/components'
2-
import { Button, Row, Spacer, Dot, Link, useModal, Modal, Image } from '@geist-ui/core'
3-
import NextLink from 'next/link'
42

53
export const meta = {
64
title: '关于我',
75
date: '2019-01-09T10:20:10.027Z',
86
description: 'description',
97
}
108

11-
export const Btc = () => {
12-
const address = '1KE89oa6aMNaVEPUeQPxLTmQGmXL6W1mGi'
13-
const { setVisible, bindings } = useModal()
14-
return (
15-
<>
16-
<Button auto size="mini" onClick={() => setVisible(true)}>
17-
Show address of BTC
18-
</Button>
19-
<Modal {...bindings}>
20-
<Modal.Title>BTC</Modal.Title>
21-
<Modal.Subtitle>This is Witt's BTC address</Modal.Subtitle>
22-
<Modal.Content>
23-
<p>{address}</p>
24-
</Modal.Content>
25-
<Modal.Action onClick={({ close }) => close()}>OK</Modal.Action>
26-
</Modal>
27-
</>
28-
)
29-
}
30-
31-
export const Alipay = () => {
32-
const { setVisible, bindings } = useModal()
33-
return (
34-
<>
35-
<Button auto size="mini" onClick={() => setVisible(true)}>
36-
Show Alipay
37-
</Button>
38-
<Modal {...bindings}>
39-
<Modal.Title>Alipay</Modal.Title>
40-
<Modal.Subtitle>Scan code with Alipay</Modal.Subtitle>
41-
<Modal.Content>
42-
<Image width={150} height={150} src="/assets/alipay.png" />
43-
</Modal.Content>
44-
<Modal.Action onClick={({ close }) => close()}>OK</Modal.Action>
45-
</Modal>
46-
</>
47-
)
48-
}
49-
50-
你好,我是维特,一个自由主义者,<del>JavaScript 全栈?</del> 工程师。对 Serverless 与 DX (Developer experience) 很感兴趣。
51-
喜欢 `CoffeeScript``Ruby`,但一直在写 `TypeScript`。主要贡献是创造一些应用和类库来帮助提高开发者体验。
9+
你好,我是维特,一个自由主义者,<del>JavaScript 全栈?</del> 工程师。对边缘化设施 (Edge) 与开发者体验很感兴趣。
10+
喜欢 `CoffeeScript``Ruby`,但一直在写 `TypeScript`
5211

53-
我很少写博客,_Hello World_ 文章实在讨人厌,不想成为智障。但水平不够写不出好东西,所以不写。如果你发现博文更新,那就是我的工作不饱和了。
54-
此外这里也提供 **Review** 服务,你可以在 <Link color rel="nofollow" target="_blank" href="https://review.unix.bio">Review It</Link> 中提交自己的 `Pull Request` 链接,
55-
我会在收到通知后立刻帮你分析代码,并尽可能多的提出对提高你编程能力有显著帮助的建议。
12+
主要贡献是创造一些应用和类库来帮助提高开发者体验。
13+
我很少写博客,_Hello World_ 文章实在讨人厌,不想成为智障。但水平不够写不出好东西,所以不写。如果你发现博文更新,那就是我的工作又开始不饱和了。
5614

57-
我非常乐意倾听来自你的想法,你可以通过 <Link rel="nofollow" color target="_blank" href="mailto:[email protected]">邮件</Link> 与我取得联系。
58-
现在你所见的站点来自我的开源项目 <Link rel="nofollow" href="https://github.com/unix/unix.bio">unix/unix.bio (MIT)</Link> ,
15+
我非常乐意倾听来自你的想法,你可以通过 [邮件](mailto:[email protected]) 与我取得联系。现在你所见的站点来自我的开源项目 [unix/unix.bio (MIT)](https://github.com/unix/unix.bio)
5916
你可以无偿的使用它构建属于自己的博客。
6017

61-
由于缺乏时间维护开源项目,我当前已经不再接受赞助。非常感谢 <NextLink href="/others/sponsors"><Link color>所有的赞助者</Link></NextLink>
18+
由于缺乏时间维护开源项目,我当前已经不再接受赞助。非常感谢 [所有的赞助者](/others/sponsors)
6219

6320
export default ({ children }) => <Layout meta={meta}>{children}</Layout>

pages/fixed/projects.mdx

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const Item = ({ name, git, desc, image }) => {
3131
}
3232

3333
我正在创造一些能够改善开发者体验的工具和开源项目,如果你有不错的想法或正面临一些重复性的工作,
34-
想要有任何改进?<Link rel="nofollow" color target="_blank" href="mailto:[email protected]">请让我知道</Link>
34+
想要有任何改进?[请让我知道](mailto:[email protected])
3535

3636
<Spacer h={1.5} />
3737
<Grid.Container gap={2} justify="center">
@@ -60,10 +60,10 @@ export const Item = ({ name, git, desc, image }) => {
6060
image="https://repository-images.githubusercontent.com/245429351/7a54a280-88d5-11ea-96ae-6a2dfaf25b1b"
6161
/>
6262
<Item
63-
name="want"
64-
git="unix/want"
65-
desc="以不下载的方式在线运行命令,无负担运维"
66-
image="https://repository-images.githubusercontent.com/180941196/b2568a00-af03-11ea-8e25-f3cf612ebb84"
63+
name="secret"
64+
git="unix/secret"
65+
desc="用离线加密与阅后即焚分享文本信息"
66+
image="https://user-images.githubusercontent.com/11304944/109418912-a9f89d80-7a05-11eb-9d72-1fcc2faa09ed.png"
6767
/>
6868
<Item
6969
name="views.show"
@@ -76,44 +76,43 @@ export const Item = ({ name, git, desc, image }) => {
7676
<Dot type="success">维护中项目</Dot>
7777
<Spacer h={0.5} />
7878

79-
- [geist-vue](https://github.com/geist-org/vue) Geist UI 的 Vue 实现
79+
- [want](https://github.com/unix/want) 通过 Serverless 管理 shell 模板
80+
- [next-password](https://github.com/unix/next-password) 使用密码保护你的 Next.js 应用
8081
- [koa-ts](https://github.com/unix/koa-ts) Koa2 与 TS 的最佳实践,包含脚手架
8182
- [done](https://github.com/unix/done) 自动化、标准化的 Release 工具
8283
- [cdn-viewer](https://github.com/unix/cdn-viewer) 以文件树审阅任何版本时的仓库或包
8384
- [func-service](https://github.com/unix/func-service) 使用 func 构建的 func 脚手架
8485
- [store-now](https://github.com/unix/store-now) 命令行工具文件存储
85-
- [geist-style](https://github.com/geist-org/style) Geist UI 的 CSS 实现
8686
- [typographic](https://github.com/geist-org/typographic) Geist UI 字体排版的实现
87-
- [geist-ui/vue-icons](https://github.com/geist-org/vue-icons) Geist UI 的 Vue 图标组件
88-
- [geist-ui/react-icons](https://github.com/geist-org/react-icons) Geist UI 的 React 图标组件
89-
- [v-decorators](https://github.com/unix/v-decorators) Vue 实用 decorators 库
87+
- [geist-ui/react-icons](https://github.com/geist-org/icons) Geist UI 的图标库
9088

9189
<Spacer h={3} />
9290
<Dot type="warning">维护频率低的项目</Dot>
9391
<Spacer h={0.5} />
9492

9593
- [aliyun-logs](https://github.com/unix/aliyun-logs) - 阿里云日志 SDK
96-
- [docs](https://github.com/unix/docs) Geek 风格的文档中心
9794
- [pages](https://github.com/unix/pages) - 为每个项目生成主页
98-
- [euv](https://github.com/DhyanaChina/euv) Vue 的控制反转实现
9995
- [vue-auto](https://github.com/unix/vue-auto) Vue 自动 import 服务
10096
- [koa-custom-response](https://github.com/unix/koa-custom-response) Koa Restful 定制方法库
10197
- [cobot](https://github.com/unix/cobot) - Gitlab 机器人框架,更语义化的事件与 Git Event 提示
10298
- [v2ex-cli](https://github.com/unix/v2ex-cli) v2ex 命令行工具
10399
- [todo-live](https://github.com/unix/todo-live) todo 命令行工具
100+
- [v-decorators](https://github.com/unix/v-decorators) Vue 实用 decorators 库
101+
- [img](https://github.com/unix/img) 在线优化图片以达到更好的社交体验
104102

105103
<Spacer h={3} />
106104
<Dot type="error">不再维护的项目</Dot>
107105
<Spacer h={0.5} />
108106

109-
- [ng-mocker](https://github.com/DhyanaChina/ng-mocker) 适用于 Angular 的开发 mock 库
107+
- [simpler-paper](https://github.com/unix/simpler-paper) static site 打包工具
108+
- [geist-style](https://github.com/geist-org/style) Geist UI 的 CSS 实现
109+
- [geist-vue](https://github.com/geist-org/vue) Geist UI 的 Vue 实现
110+
- [geist-ui/vue-icons](https://github.com/geist-org/vue-icons) Geist UI 的 Vue 图标组件
110111
- [storage-angular](https://github.com/DhyanaChina/storage-angular) Angular Storage 增强
111112
- [back-loader](https://github.com/unix/back-loader) 预加载资源库
112-
- [readyLoadImg](https://github.com/unix/readyLoadImg) 预加载图片资源
113113
- [react-native-smartbar](https://github.com/unix/react-native-smartbar) react-native tabbar
114114
- [touch-dog](https://github.com/unix/touch-dog) 划词翻译 Chrome 扩展
115-
- [simpler-paper](https://github.com/unix/simpler-paper) static site 打包工具
116-
- [easy-jsdelivr](https://github.com/unix/easy-jsdelivr) jsdelivr 界面管理与包文件查找
115+
- [docs](https://github.com/unix/docs) Geek 风格的文档中心
117116
- [element-angular](https://github.com/ElemeFE/element-angular) Element UI 的 Angular 实现
118117

119118
<Spacer h={3} />
@@ -123,8 +122,8 @@ export const Item = ({ name, git, desc, image }) => {
123122
- [just-fine/cs](https://github.com/just-fine/cs) coffeescript 的众多框架脚手架,包含 [coffee-vue](https://github.com/just-fine/vue-coffee)
124123
[coffee-sails](https://github.com/just-fine/sails-coffee) [coffee-micro](https://github.com/just-fine/micro-coffee) [coffee-react-next](https://github.com/just-fine/next-coffee)
125124
- [just-fine/fine.sh-cli](https://github.com/just-fine/fine.sh-cli) 一键部署文档工具
126-
- [now-coffee](https://github.com/unix/now-coffee) Now 的 coffeescript 编译过
127-
- [DungeonWatchDog](https://github.com/unix/DungeonWatchDog) 魔兽世界 Lua 插件,地下城过滤器,[用户量>40k](https://www.curseforge.com/wow/addons/dungeonwatchdog)
128-
- [Nioro](https://github.com/unix/Nioro) 魔兽世界 Lua 插件,框架界面增强,[用户量>14k](https://www.curseforge.com/wow/addons/Nioro)
125+
- [now-coffee](https://github.com/unix/now-coffee) Now 的 coffeescript 编译过程
126+
- [DungeonWatchDog](https://github.com/unix/DungeonWatchDog) 魔兽世界 Lua 插件,地下城过滤器,[用户量>60k](https://www.curseforge.com/wow/addons/dungeonwatchdog)
127+
- [Nioro](https://github.com/unix/Nioro) 魔兽世界 Lua 插件,框架界面增强,[用户量>20k](https://www.curseforge.com/wow/addons/Nioro)
129128

130129
export default ({ children }) => <Layout meta={meta}>{children}</Layout>

pages/others/sponsors.mdx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Layout } from 'lib/components'
2-
import { Link, Spacer, Text, User, useTheme, Grid } from '@geist-ui/core'
3-
import NextLink from 'next/link'
2+
import { Spacer, Text, User, useTheme, Grid } from '@geist-ui/core'
43
import Sponsors from '../../sponsors'
54

65
export const meta = {
@@ -32,11 +31,7 @@ export const SponsorList = () => {
3231
)
3332
}
3433

35-
非常感谢各位慷慨的赞助者帮助我确保开源项目得以维护。捐赠不是必须的,但作为礼物,如果你有需要可以邮件我,
36-
我可以帮助你远程解决一些问题或是 Review 代码。
37-
38-
你可以在 <NextLink href="/fixed/about"><Link color>关于我</Link></NextLink> 的页面找到捐赠链接,
39-
按月赞助来自于 GitHub Sponsors。
34+
非常感谢各位慷慨的赞助者。
4035

4136
<Spacer h={2} />
4237
<SponsorList />

pages/posts/about.mdx

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

0 commit comments

Comments
 (0)