Skip to content

Commit

Permalink
fix: seo
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jul 2, 2023
1 parent b579a80 commit eae3e03
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 8 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ A minimalist personal website embodying the purity of paper and freshness of sno

A theme for [Mix Space](https://github.com/mx-space)

## 动机

Kami 的代码已经超过 3 年,实在变得难以维护,一堆屎一样的代码。自己看了都感到恶心。其次是太多的 Hydration Error 看着心烦,换个风格也挺好。

本次重写不仅在风格上的不同,在代码层面上也更加符合 React 哲学,使用了非常牛逼的 Jotai 作为状态管理,🍞老师果然说的没错,Jotai yyds。

几乎重写了 80% 的原代码,覆盖了几个主要页面。

## Status

**WIP**
Expand Down
11 changes: 11 additions & 0 deletions src/app/robots.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { MetadataRoute } from 'next'

export default function robots(): MetadataRoute.Robots {
return {
rules: {
userAgent: '*',
allow: '/',
disallow: ['/login/', '/preview/'],
},
}
}
3 changes: 3 additions & 0 deletions src/app/timeline/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { PropsWithChildren } from 'react'
import { TimelineType } from '@mx-space/api-client'

import { QueryHydrate } from '~/components/common/QueryHydrate'
import { SearchFAB } from '~/components/widgets/shared/SearchFAB'
import { REQUEST_QUERY } from '~/constants/system'
import { attachUA } from '~/lib/attach-ua'
import { getQueryClient } from '~/lib/query-client.server'
Expand Down Expand Up @@ -50,6 +51,8 @@ export default async (props: NextPageParams<{}, PropsWithChildren>) => {
})}
>
{props.children}

<SearchFAB />
</QueryHydrate>
)
}
1 change: 1 addition & 0 deletions src/components/layout/header/internal/AnimatedLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const TapableLogo = () => {
return (
<button onClick={fn}>
<SiteOwnerAvatar className="cursor-pointer" />
<span className="sr-only">Owner Avatar</span>
</button>
)
}
Expand Down
9 changes: 3 additions & 6 deletions src/components/widgets/comment/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { memo, useMemo } from 'react'
import type { FC } from 'react'
import type { CommentBaseProps } from './types'

import { BottomToUpSoftScaleTransitionView } from '~/components/ui/transition/BottomToUpSoftScaleTransitionView'
import { apiClient } from '~/lib/request'

import { LoadMoreIndicator } from '../shared/LoadMoreIndicator'
Expand Down Expand Up @@ -72,10 +71,8 @@ export const Comments: FC<CommentBaseProps> = ({ refId }) => {
const CommentListItem: FC<{ comment: any; refId: string; index: number }> =
memo(function CommentListItem({ comment, refId, index }) {
return (
<BottomToUpSoftScaleTransitionView>
<CommentBoxProvider refId={refId}>
<Comment comment={comment} showLine={index > 0} />
</CommentBoxProvider>
</BottomToUpSoftScaleTransitionView>
<CommentBoxProvider refId={refId}>
<Comment comment={comment} showLine={index > 0} />
</CommentBoxProvider>
)
})
1 change: 1 addition & 0 deletions src/components/widgets/note/NoteTopic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const NoteTopic: FC = () => {
text={textToBigCharOrWord(name)}
className="flex-shrink-0"
shadow={false}
alt={`专栏 ${name} 的头像`}
/>
<div className="flex flex-grow flex-col self-start">
<span className="text-md mb-2 font-medium">
Expand Down
4 changes: 2 additions & 2 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ const twConfig: Config = {
{
dark: {
'color-scheme': 'dark',
primary: '#91bef0',
primary: '#1F7BE0',
secondary: '#39C5BB',
accent: '#91bef0',
accent: '#1F7BE0',

neutral: UIKitColors.grey3.dark,

Expand Down

1 comment on commit eae3e03

@vercel
Copy link

@vercel vercel bot commented on eae3e03 Jul 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

shiro – ./

springtide.vercel.app
shiro-innei.vercel.app
shiro-git-main-innei.vercel.app
innei.in

Please sign in to comment.