1301
This commit is contained in:
1 parent
f99ddec735
commit
8cd35ca127
9 files changed
+263
-45
No files matched your search
@@ -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 {
|
||||
|
||||
@@ -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 预览启动失败");
|
||||
}
|
||||
|
||||
@@ -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 预览启动失败,请稍后再试");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user