|
at
diff --git a/src/components/EditPost.astro b/src/components/EditPost.astro
index 8bdbeee..1873459 100644
--- a/src/components/EditPost.astro
+++ b/src/components/EditPost.astro
@@ -12,7 +12,7 @@ export interface Props {
const { editPost, postId, class: className = "" } = Astro.props;
let editPostUrl = editPost?.url ?? SITE?.editPost?.url ?? "";
-const showEditPost = !editPost?.disabled && editPostUrl.length > 0;
+const showEditPost = !SITE.editPost.disabled&&!editPost?.disabled && editPostUrl.length > 0;
const appendFilePath =
editPost?.appendFilePath ?? SITE?.editPost?.appendFilePath ?? false;
if (appendFilePath && postId) {
diff --git a/src/components/Footer.astro b/src/components/Footer.astro
index 134115b..fba9e14 100644
--- a/src/components/Footer.astro
+++ b/src/components/Footer.astro
@@ -1,6 +1,8 @@
---
import Hr from "./Hr.astro";
import Socials from "./Socials.astro";
+import '../config'
+import { SITE } from "../config";
const currentYear = new Date().getFullYear();
@@ -18,7 +20,7 @@ const { noMarginTop = false } = Astro.props;
>
- Copyright © {currentYear}
+ Copyright © {currentYear} {SITE.author}
|
All rights reserved.
diff --git a/src/components/Tag.astro b/src/components/Tag.astro
index 1744c8b..981b14a 100644
--- a/src/components/Tag.astro
+++ b/src/components/Tag.astro
@@ -1,6 +1,4 @@
---
-import IconHash from "@/assets/icons/IconHash.svg";
-
export interface Props {
tag: string;
tagName: string;
diff --git a/src/config.ts b/src/config.ts
index e302c72..9a6a5a8 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -12,7 +12,8 @@ export const SITE = {
showArchives: true,
showBackButton: true, // show back button in post detail
editPost: {
- url: "https://github.com/blue-cape/astro-paper-zh/edit/main/src/content/blog",
+ disabled: true,
+ url: "https://codeberg.org/blue-cape/astro-paper-zh/src/branch/main/src/data/blog",
text: "建议修改",
appendFilePath: true,
},
diff --git a/src/pages/index.astro b/src/pages/index.astro
index f088431..5c7bee2 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -25,7 +25,7 @@ const recentPosts = sortedPosts.filter(({ data }) => !data.featured);