diff --git a/.eslintrc.js b/.eslintrc.js index a40450ac..e2a5efe4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,6 +5,7 @@ module.exports = { node: true }, extends: [ + 'plugin:react/jsx-runtime', 'plugin:react/recommended', 'plugin:@next/next/recommended', 'standard', diff --git a/lib/config.js b/lib/config.js index 13d805ba..63781524 100644 --- a/lib/config.js +++ b/lib/config.js @@ -50,7 +50,7 @@ export const siteConfig = (key, defaultVal = null, extendConfig = {}) => { // console.warn('SiteConfig警告', key, error) } - // 首先 配置最优先读取NOTION中的表格配置 + // 配置最优先读取NOTION中的表格配置 let val = null let siteInfo = null diff --git a/themes/gitbook/components/ArticleInfo.js b/themes/gitbook/components/ArticleInfo.js index b2d58efe..d559a90d 100644 --- a/themes/gitbook/components/ArticleInfo.js +++ b/themes/gitbook/components/ArticleInfo.js @@ -1,9 +1,16 @@ +/** + * 文章补充咨询 + * @param {*} param0 + * @returns + */ export default function ArticleInfo({ post }) { if (!post) { return null } - return
- - Last update: { post.date?.start_date} + return ( +
+ + Last update: {post.date?.start_date}
+ ) } diff --git a/themes/gitbook/components/BottomMenuBar.js b/themes/gitbook/components/BottomMenuBar.js index 79b498ea..478a52eb 100644 --- a/themes/gitbook/components/BottomMenuBar.js +++ b/themes/gitbook/components/BottomMenuBar.js @@ -12,7 +12,7 @@ export default function BottomMenuBar({ post, className }) { return ( <> {/* 移动端底部导航按钮 */} -
+
diff --git a/themes/gitbook/components/Catalog.js b/themes/gitbook/components/Catalog.js index 9173fa7d..0aa0d337 100644 --- a/themes/gitbook/components/Catalog.js +++ b/themes/gitbook/components/Catalog.js @@ -81,14 +81,15 @@ const Catalog = ({ post }) => { + className={`truncate`}> {tocItem.text} diff --git a/themes/gitbook/components/Footer.js b/themes/gitbook/components/Footer.js index 60dc84b3..3a50e907 100644 --- a/themes/gitbook/components/Footer.js +++ b/themes/gitbook/components/Footer.js @@ -13,12 +13,10 @@ const Footer = ({ siteInfo }) => { parseInt(since) < currentYear ? since + '-' + currentYear : currentYear return ( -