Skip to content

Commit 67c6c07

Browse files
committed
chore: migrate to geist core
1 parent f36e5d1 commit 67c6c07

29 files changed

+1080
-2269
lines changed

lib/components/contacts.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { useMemo } from 'react'
2-
import { useTheme, Spacer, Link, Divider } from '@geist-ui/react'
2+
import { useTheme, Spacer, Link, Divider } from '@geist-ui/core'
33
import useConfigs from '../config-context'
4-
import SunIcon from '@geist-ui/react-icons/sun'
5-
import MoonIcon from '@geist-ui/react-icons/moon'
4+
import SunIcon from '@geist-ui/icons/sun'
5+
import MoonIcon from '@geist-ui/icons/moon'
66
import { Configs } from '../utils'
77

88
export interface ContactsProps {

lib/components/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Head from 'next/head'
33
import Profile from './profile'
44
import Contacts from './contacts'
55
import Title from './title'
6-
import { Spacer } from '@geist-ui/react'
6+
import { Spacer } from '@geist-ui/core'
77
import { Configs } from '../utils'
88

99
export type PostMetadata = {

lib/components/posts/post-item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import { Link, useTheme } from '@geist-ui/react'
2+
import { Link, useTheme } from '@geist-ui/core'
33
import NextLink from 'next/link'
44

55
const options: Intl.DateTimeFormatOptions = {

lib/components/posts/posts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import PostItem from './post-item'
44
import { Configs } from 'lib/utils'
55
import NextLink from 'next/link'
66
import metadata from 'lib/data/metadata.json'
7-
import { useTheme, Link } from '@geist-ui/react'
7+
import { useTheme, Link } from '@geist-ui/core'
88

99
const getMoreLink = (len: number): React.ReactNode => {
1010
if (len < Configs.latestLimit) return null

lib/components/profile-links.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useMemo } from 'react'
22
import NextLink from 'next/link'
3-
import { useTheme, Link } from '@geist-ui/react'
3+
import { useTheme, Link } from '@geist-ui/core'
44
import metadata from '../data/metadata.json'
55
import { Configs } from '../utils'
66

lib/components/profile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { useState, useEffect } from 'react'
2-
import { useTheme, User, Link } from '@geist-ui/react'
2+
import { useTheme, User, Link } from '@geist-ui/core'
33
import NextLink from 'next/link'
44
import ProfileLinks from './profile-links'
55
import { Configs } from '../utils'

lib/components/title.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useMemo } from 'react'
22
import { msToString } from '../data-transform'
3-
import { useTheme } from '@geist-ui/react'
3+
import { useTheme } from '@geist-ui/core'
44
import { useRouter } from 'next/router'
55
import { Configs } from '../utils'
66
import useViews from '@unix/views'

next-env.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/// <reference types="next" />
2-
/// <reference types="next/types/global" />
32
/// <reference types="next/image-types/global" />
43

54
// NOTE: This file should not be edited

next.config.js

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ const withMDX = require('@next/mdx')({
1313
})
1414

1515
const nextConfig = {
16-
target: 'serverless',
17-
1816
pageExtensions: ['jsx', 'js', 'mdx', 'md', 'ts', 'tsx'],
1917

2018
cssModules: true,
@@ -34,41 +32,39 @@ const nextConfig = {
3432
VERSION: require('./package.json').version,
3533
},
3634

37-
experimental: {
38-
redirects() {
39-
return [
40-
{
41-
source: '/blog/others/:path*',
42-
permanent: true,
43-
destination: '/posts/:path*',
44-
},
45-
{
46-
source: '/blog/others/:path*/',
47-
permanent: true,
48-
destination: '/posts/:path*',
49-
},
50-
{
51-
source: '/blog/js/:path*',
52-
permanent: true,
53-
destination: '/posts/:path*',
54-
},
55-
{
56-
source: '/blog/js/:path*/',
57-
permanent: true,
58-
destination: '/posts/:path*',
59-
},
60-
{
61-
source: '/blog/proxy/:path*',
62-
permanent: true,
63-
destination: '/posts/:path*',
64-
},
65-
{
66-
source: '/blog/proxy/:path*/',
67-
permanent: true,
68-
destination: '/posts/:path*',
69-
},
70-
]
71-
},
35+
redirects() {
36+
return [
37+
{
38+
source: '/blog/others/:path*',
39+
permanent: true,
40+
destination: '/posts/:path*',
41+
},
42+
{
43+
source: '/blog/others/:path*/',
44+
permanent: true,
45+
destination: '/posts/:path*',
46+
},
47+
{
48+
source: '/blog/js/:path*',
49+
permanent: true,
50+
destination: '/posts/:path*',
51+
},
52+
{
53+
source: '/blog/js/:path*/',
54+
permanent: true,
55+
destination: '/posts/:path*',
56+
},
57+
{
58+
source: '/blog/proxy/:path*',
59+
permanent: true,
60+
destination: '/posts/:path*',
61+
},
62+
{
63+
source: '/blog/proxy/:path*/',
64+
permanent: true,
65+
destination: '/posts/:path*',
66+
},
67+
]
7268
},
7369
}
7470

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@
1212
},
1313
"prettier": "@geist-ui/prettier-config",
1414
"dependencies": {
15-
"@geist-ui/react": "^2.2.0",
16-
"@geist-ui/react-icons": "^1.0.1",
17-
"@geist-ui/react-prism": "^1.0.1",
15+
"@geist-ui/core": "^2.3.4",
16+
"@geist-ui/icons": "^1.0.1",
17+
"@geist-ui/prism": "^1.1.1",
1818
"@unix/views": "^0.2.0",
1919
"ms": "^2.1.3",
20-
"next": "^11.1.0",
20+
"next": "^12.1.0",
2121
"react": "^17.0.2",
2222
"react-dom": "^17.0.2"
2323
},
2424
"devDependencies": {
2525
"@geist-ui/prettier-config": "^1.0.1",
2626
"@mapbox/rehype-prism": "^0.7.0",
27-
"@mdx-js/loader": "^1.6.22",
28-
"@next/mdx": "^11.1.0",
27+
"@mdx-js/loader": "^2.0.0",
28+
"@next/mdx": "^12.1.0",
2929
"@types/ms": "^0.7.31",
30-
"@types/react": "^17.0.18",
31-
"@types/react-dom": "^17.0.9",
30+
"@types/react": "^17.0.39",
31+
"@types/react-dom": "^17.0.11",
3232
"chalk": "^3.0.0",
3333
"extract-mdx-metadata": "1.0.0",
34-
"fs-extra": "^8.1.0",
35-
"prettier": "^2.0.5",
34+
"fs-extra": "^10.0.0",
35+
"prettier": "^2.5.1",
3636
"prompt-sync": "^4.2.0",
3737
"rehype-join-line": "^1.0.2",
3838
"styled-jsx": "^4.0.0",
39-
"typescript": "^4.3.5"
39+
"typescript": "^4.5.5"
4040
}
4141
}

0 commit comments

Comments
 (0)