文章路由支持配置,完善自定义Notion字段配置

This commit is contained in:
tangly
2022-10-18 16:30:38 +08:00
parent c5efc841ba
commit 1fcafeb214
32 changed files with 91 additions and 187 deletions

View File

@@ -23,7 +23,7 @@ export const BlogList = (props) => {
{posts.map(p => (
<article key={p.id} className="mb-12" >
<h2 className="mb-4">
<Link href={`/article/${p.slug}`}>
<Link href={`/${p.slug}`}>
<a className="text-black dark:text-gray-100 text-xl md:text-2xl no-underline hover:underline"> {p.title}</a>
</Link>
</h2>

View File

@@ -30,7 +30,7 @@ export const SideBar = (props) => {
<div className="p-4">
<ul className="list-reset leading-normal">
{latestPosts?.map(p => {
return <Link key={p.id} href={`/article/${p.slug}`} passHref>
return <Link key={p.id} href={`/${p.slug}`} passHref>
<li> <a href="#" className="text-gray-darkest text-sm">{p.title}</a></li>
</Link>
})}