Skip to content

Commit

Permalink
change site config
Browse files Browse the repository at this point in the history
  • Loading branch information
Freelander committed Jun 29, 2024
1 parent b9abb80 commit a33910e
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 577 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default defineConfig({
cleanUrls: true,
ignoreDeadLinks: true,
sitemap: {
hostname: 'https://fav0.com'
hostname: 'https://daily.gojun.com'
},
head: [
["script", { async: "", src: "https://www.googletagmanager.com/gtag/js?id=G-Z6HGDC7ZBL" }],
Expand Down
4 changes: 2 additions & 2 deletions docs/.vitepress/config/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ export default defineConfig({
],

editLink: {
pattern: "https://github.com/Justin3go/FAV0/edit/master/docs/:path",
pattern: "https://github.com/Freelander/AI-Daily/edit/master/docs/:path",
text: "在GitHub上编辑此页",
},
returnToTopLabel: "回到顶部",
sidebarMenuLabel: "目录",
sidebarMenuLabel: "时间线",
darkModeSwitchLabel: "深色模式",
},
})
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/theme/components/BuyMeACoffee.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
size="large"
class="btn"
tag="a"
href="https://ko-fi.com/V7V6YU3UT"
href="https://ko-fi.com/gojun"
target="_blank"
>☕️ Buy Me a Coffee →</t-button
>
Expand Down
11 changes: 7 additions & 4 deletions docs/.vitepress/theme/components/Comment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<!-- params generate in https://giscus.app/zh-CN -->
<Giscus
v-if="showComment"
repo="Justin3go/FAV0"
repo-id="R_kgDOMAyo3w"
repo="Freelander/AI-Daily"
repo-id="R_kgDOMJdJuA"
category="General"
category-id="DIC_kwDOMAyo384Cfno-"
category-id="DIC_kwDOMJdJuM4CgeMF"
mapping="specific"
:term="term"
strict="1"
Expand All @@ -28,7 +28,10 @@ import Giscus from "@giscus/vue";
const route = useRoute();
const { isDark } = useData();
const term = computed(() => route.path.slice(-3));
const term = computed(() => {
const pathParts = route.path.split('/');
return pathParts[pathParts.length - 1];
});
const theme = computed(() => (isDark.value ? "noborder_dark" : "noborder_light"));
const lang = computed(() => route.path.startsWith("/en") ? 'en' : 'zh-Hans');
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
"doc-after": () => h(Comment),
"doc-bottom": () => h(ImageViewer),
"doc-footer-before": () => h(BuyMeACoffee),
// "doc-footer-before": () => h(BuyMeACoffee),
"aside-top": () => h(Subscribe),
});
},
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/utils/handleHeadMeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function handleHeadMeta(context: TransformContext) {
}

export function addBase(relativePath: string) {
const host = 'https://fav0.com'
const host = 'https://daily.gojun.me'
if (relativePath.startsWith('/')) {
return host + relativePath
} else {
Expand Down
26 changes: 13 additions & 13 deletions docs/.vitepress/utils/rss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import { writeFileSync } from "node:fs";
import { Feed } from "feed";
import { createContentLoader, type SiteConfig } from "vitepress";

const hostname = "https://fav0.com";
const hostname = "https://daily.gojun.me";

export async function createRssFileZH(config: SiteConfig) {
const feed = new Feed({
title: "FAV0周刊",
description: "《FAV0周刊》:记录每周所见所闻,主要关注前端、AI领域以及计算机相关内容",
title: "高军 AI 日报",
description: "《高军 AI 日报》:内容涵盖但不限于前沿 AI 资讯、AI 工具、AI 绘画、开源项目和学习教程等。",
id: hostname,
link: hostname,
language: "zh-Hans",
image: "/favicon.png",
favicon: `/favicon.ico`,
copyright: "Copyright© 2024-present Justin3go",
copyright: "Copyright© 2024-present GoJun",
});

const posts = await createContentLoader("posts/**/*.md", {
Expand All @@ -38,9 +38,9 @@ export async function createRssFileZH(config: SiteConfig) {
content: html,
author: [
{
name: "Justin3go",
email: "just@justin3go.com",
link: "https://justin3go.com",
name: "GoJun",
email: "huanggaojun13@gmai.com",
link: "https://daily.gojun.me",
},
],
date: frontmatter.date,
Expand All @@ -52,14 +52,14 @@ export async function createRssFileZH(config: SiteConfig) {

export async function createRssFileEN(config: SiteConfig) {
const feed = new Feed({
title: "FAV0 Weekly",
description: "FAV0 Weekly: Documenting Weekly Observations and Experiences, with a Focus on Front-end Development, AI, and Computer-related Topics",
title: "高军 AI 日报",
description: "《高军 AI 日报》:内容涵盖但不限于前沿 AI 资讯、AI 工具、AI 绘画、开源项目和学习教程等。",
id: hostname,
link: hostname,
language: "en-US",
image: "/favicon.png",
favicon: `/favicon.ico`,
copyright: "Copyright© 2024-present Justin3go",
copyright: "Copyright© 2024-present GoJun",
});

const posts = await createContentLoader("en/posts/**/*.md", {
Expand All @@ -83,9 +83,9 @@ export async function createRssFileEN(config: SiteConfig) {
content: html,
author: [
{
name: "Justin3go",
email: "just@justin3go.com",
link: "https://justin3go.com",
name: "GoJun",
email: "huanggaojun13@gmail.com",
link: "https://daily.gojun.me",
},
],
date: frontmatter.date,
Expand Down
175 changes: 0 additions & 175 deletions docs/en/posts/2024/000.md

This file was deleted.

Loading

0 comments on commit a33910e

Please sign in to comment.