This commit is contained in:
Vaica committed 2026-06-22 13:01:37 +08:00
1 parent f99ddec735
commit 8cd35ca127
9 files changed
+263 -45

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
import { NextRequest, NextResponse } from "next/server";
import { getWechatStatus, syncWechat } from "@/lib/rssapi";
import { getWechatStatus, syncWechat } from "@/lib/wechat";
import { marked } from "marked";
function resolveUrl(src: string, slug: string): string {
+1 -1
View File
@@ -80,7 +80,7 @@ export default function EditPostPage({
const res = await fetch("/api/hugo");
const data = await res.json();
if (data.running) {
window.open(`/preview/${post.frontMatter.slug}.html`, "_blank");
window.open(`${location.protocol}//${location.hostname}:1313/${post.frontMatter.slug}.html`, "_blank");
} else {
alert("Hugo 预览启动失败");
}
+1 -1
View File
@@ -82,7 +82,7 @@ export default function HomePage() {
const res = await fetch("/api/hugo");
const data = await res.json();
if (data.running) {
window.open(`/preview/${slug}.html`, "_blank");
window.open(`${location.protocol}//${location.hostname}:1313/${slug}.html`, "_blank");
} else {
alert("Hugo 预览启动失败,请稍后再试");
}