Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

Use blog routes for deployment article

yomae0a6a6957840
diff --git a/apps/site/src/components/hero.astro b/apps/site/src/components/hero.astro
index f26c0a9f..92cde902 100644
--- a/apps/site/src/components/hero.astro
+++ b/apps/site/src/components/hero.astro
@@ -43,7 +43,7 @@ const heroSlogan = "基于 Cloudflare 全家桶自托管的开源『印象笔记
</Link>
<a
rel="noopener"
- href="/timeline/ai-agent-deploy-cloudflare"
+ href="/blog/ai-agent-deploy-cloudflare"
class="flex gap-2 items-center justify-center px-6 py-3 bg-white/50 backdrop-blur-sm border border-slate-200 hover:border-slate-300 rounded-xl text-slate-600 hover:text-brand-text transition-all text-sm font-medium hover:-translate-y-0.5"
>
<Icon class="w-5 h-5" name="bx:bxs-bot" />
diff --git a/apps/site/src/layouts/BlogLayout.astro b/apps/site/src/layouts/BlogLayout.astro
index 84aa727c..e6fdc4f3 100644
--- a/apps/site/src/layouts/BlogLayout.astro
+++ b/apps/site/src/layouts/BlogLayout.astro
@@ -40,9 +40,9 @@ const { frontmatter } = Astro.props;
</div>
<div class="text-center mt-8">
<a
- href="/timeline"
+ href="/blog"
class="bg-gray-100 px-5 py-3 rounded-md hover:bg-gray-200 transition"
- >← Back to Blog</a
+ >返回博客</a
>
</div>
</Container>
diff --git a/apps/site/src/pages/blog.astro b/apps/site/src/pages/blog.astro
index 8392204d..67dffcee 100644
--- a/apps/site/src/pages/blog.astro
+++ b/apps/site/src/pages/blog.astro
@@ -1,18 +1,48 @@
---
-const target = "/timeline";
+import { getCollection } from "astro:content";
+import Container from "@/components/container.astro";
+import Layout from "@/layouts/Layout.astro";
+import { getFormattedDate } from "@/utils/all";
+
+const entries = (await getCollection("blog", ({ data }) => !data.draft)).sort(
+ (a, b) => b.data.publishDate.getTime() - a.data.publishDate.getTime(),
+);
---
-<!doctype html>
-<html lang="zh-CN">
- <head>
- <meta charset="UTF-8" />
- <meta http-equiv="refresh" content={`0; url=${target}`} />
- <link rel="canonical" href={target} />
- <title>跳转到产品时间轴 | EdgeEver</title>
- </head>
- <body>
- <p>
- 页面已迁移到 <a href={target}>产品时间轴</a>。
- </p>
- </body>
-</html>
+<Layout title="Blog">
+ <Container>
+ <main class="mx-auto max-w-4xl py-16 md:py-24">
+ <div class="mb-10">
+ <p class="text-sm font-semibold text-brand-text">EdgeEver Blog</p>
+ <h1 class="mt-3 text-4xl font-bold tracking-tight text-slate-900 md:text-5xl">
+ 博客
+ </h1>
+ </div>
+
+ <div class="grid gap-4">
+ {
+ entries.map((entry) => (
+ <a
+ href={`/blog/${entry.slug}`}
+ class="group rounded-2xl border border-slate-200 bg-white p-6 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-border hover:shadow-lg"
+ >
+ <div class="flex flex-wrap items-center gap-3 text-sm text-slate-500">
+ <span>{entry.data.category}</span>
+ <span>·</span>
+ <time datetime={entry.data.publishDate.toISOString()}>
+ {getFormattedDate(entry.data.publishDate)}
+ </time>
+ </div>
+ <h2 class="mt-3 text-2xl font-bold text-slate-900 transition group-hover:text-brand-text">
+ {entry.data.title}
+ </h2>
+ <p class="mt-3 text-base leading-7 text-slate-600">
+ {entry.data.snippet}
+ </p>
+ </a>
+ ))
+ }
+ </div>
+ </main>
+ </Container>
+</Layout>
diff --git a/apps/site/src/pages/blog/[slug].astro b/apps/site/src/pages/blog/[slug].astro
index 2a46613e..fccae93c 100644
--- a/apps/site/src/pages/blog/[slug].astro
+++ b/apps/site/src/pages/blog/[slug].astro
@@ -1,28 +1,19 @@
---
-import { getCollection } from "astro:content";
+import { getCollection, render } from "astro:content";
+import BlogLayout from "@/layouts/BlogLayout.astro";
export async function getStaticPaths() {
- const entries = await getCollection("blog");
+ const entries = await getCollection("blog", ({ data }) => !data.draft);
return entries.map((entry) => ({
params: { slug: entry.slug },
- props: { target: `/timeline/${entry.slug}` },
+ props: { entry },
}));
}
-const { target } = Astro.props;
+const { entry } = Astro.props;
+const { Content } = await render(entry);
---
-<!doctype html>
-<html lang="zh-CN">
- <head>
- <meta charset="UTF-8" />
- <meta http-equiv="refresh" content={`0; url=${target}`} />
- <link rel="canonical" href={target} />
- <title>跳转到产品时间轴 | EdgeEver</title>
- </head>
- <body>
- <p>
- 页面已迁移到 <a href={target}>新的文档地址</a>。
- </p>
- </body>
-</html>
+<BlogLayout frontmatter={entry.data}>
+ <Content />
+</BlogLayout>
diff --git a/apps/site/src/pages/timeline.astro b/apps/site/src/pages/timeline.astro
deleted file mode 100644
index f4120138..00000000
--- a/apps/site/src/pages/timeline.astro
+++ /dev/null
@@ -1,48 +0,0 @@
----
-import { getCollection } from "astro:content";
-import Container from "@/components/container.astro";
-import Layout from "@/layouts/Layout.astro";
-import { getFormattedDate } from "@/utils/all";
-
-const entries = (await getCollection("blog", ({ data }) => !data.draft)).sort(
- (a, b) => b.data.publishDate.getTime() - a.data.publishDate.getTime(),
-);
----
-
-<Layout title="产品时间轴">
- <Container>
- <main class="mx-auto max-w-4xl py-16 md:py-24">
- <div class="mb-10">
- <p class="text-sm font-semibold text-brand-text">EdgeEver Timeline</p>
- <h1 class="mt-3 text-4xl font-bold tracking-tight text-slate-900 md:text-5xl">
- 产品时间轴
- </h1>
- </div>
-
- <div class="grid gap-4">
- {
- entries.map((entry) => (
- <a
- href={`/timeline/${entry.slug}`}
- class="group rounded-2xl border border-slate-200 bg-white p-6 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-border hover:shadow-lg"
- >
- <div class="flex flex-wrap items-center gap-3 text-sm text-slate-500">
- <span>{entry.data.category}</span>
- <span>·</span>
- <time datetime={entry.data.publishDate.toISOString()}>
- {getFormattedDate(entry.data.publishDate)}
- </time>
- </div>
- <h2 class="mt-3 text-2xl font-bold text-slate-900 transition group-hover:text-brand-text">
- {entry.data.title}
- </h2>
- <p class="mt-3 text-base leading-7 text-slate-600">
- {entry.data.snippet}
- </p>
- </a>
- ))
- }
- </div>
- </main>
- </Container>
-</Layout>
diff --git a/apps/site/src/pages/timeline/[slug].astro b/apps/site/src/pages/timeline/[slug].astro
deleted file mode 100644
index c3d881e4..00000000
--- a/apps/site/src/pages/timeline/[slug].astro
+++ /dev/null
@@ -1,20 +0,0 @@
----
-import { getCollection, render } from "astro:content";
-import BlogLayout from "@/layouts/BlogLayout.astro";
-
-export async function getStaticPaths() {
- const entries = await getCollection("blog", ({ data }) => !data.draft);
-
- return entries.map((entry) => ({
- params: { slug: entry.slug },
- props: { entry },
- }));
-}
-
-const { entry } = Astro.props;
-const { Content } = await render(entry);
----
-
-<BlogLayout frontmatter={entry.data}>
- <Content />
-</BlogLayout>