This commit is contained in:
Vaica committed 2026-06-22 00:52:51 +08:00
1 parent b8d16016d8
commit efa527e138
6 files changed
+22 -7

No files matched your search

+1 -2
View File
@@ -73,8 +73,7 @@ export default function EditPostPage({
type="button"
onClick={async () => {
await fetch("/api/hugo");
const previewBase = `${location.protocol}//${location.hostname}:1313`;
window.open(`${previewBase}/${post.frontMatter.slug}.html`, "_blank");
window.open(`/preview/${post.frontMatter.slug}.html`, "_blank");
}}
className="flex items-center gap-1.5 px-3 py-1.5 text-[12px] rounded-md border border-line text-muted hover:text-accent hover:border-accent/30 transition-colors"
title="预览"
+1 -2
View File
@@ -78,8 +78,7 @@ export default function HomePage() {
const handlePreview = async (slug: string) => {
await fetch("/api/hugo");
const previewBase = `${location.protocol}//${location.hostname}:1313`;
window.open(`${previewBase}/${slug}.html`, "_blank");
window.open(`/preview/${slug}.html`, "_blank");
};
const toggleSelect = (slug: string) => {