diff --git a/.gitignore b/.gitignore index a547bf3..e3690e2 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,7 @@ dist-ssr *.njsproj *.sln *.sw? + +# 环境变量 +.env +.env.* \ No newline at end of file diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 1549a26..9f5a880 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -161,7 +161,8 @@ const cleanupGitHubCalendar = () => { }; const fetchRSSFeed = async () => { - const rssUrl = "https://blog.kisechan.space/atom.xml"; + const rssUrl = import.meta.env.VITE_RSS_FEED_URL; + console.log("Fetching RSS Feed:", rssUrl); try { const response = await fetch(rssUrl); const str = await response.text(); diff --git a/src/views/LinksView.vue b/src/views/LinksView.vue index 432933c..d2faa19 100644 --- a/src/views/LinksView.vue +++ b/src/views/LinksView.vue @@ -42,12 +42,10 @@
请按照以下格式提交您的友链信息:
--avatar: "您的头像链接" +avatar: "您的头像链接" title: "您的博客标题" description: "您的博客描述" -url: "您的博客链接"+url: "您的博客链接"
并发送至:links@kisechan.space response.text()) .then((text) => { friendLinks.value = yaml.load(text); diff --git a/src/views/ToolsView.vue b/src/views/ToolsView.vue index 728f084..797f206 100644 --- a/src/views/ToolsView.vue +++ b/src/views/ToolsView.vue @@ -43,7 +43,7 @@ const loading = ref(true); // 加载 YAML 文件 - fetch("/tools.yml") + fetch(import.meta.env.VITE_TOOLS_YAML_URL) .then((response) => response.text()) .then((text) => { tools.value = yaml.load(text); @@ -52,7 +52,7 @@ console.error("Failed to load YAML file:", error); }) .finally(() => { - loading.value = false; // 数据加载完成后,设置 loading 为 false + loading.value = false; }); const openLink = (url) => {