0052
This commit is contained in:
1 parent
d664326648
commit
612cafe5ad
6 files changed
+22
-7
No files matched your search
@@ -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="预览"
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user