-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a2ea0a0
Showing
9 changed files
with
1,603 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variable files | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# vuepress v2.x temp and cache directory | ||
.temp | ||
.cache | ||
|
||
# Docusaurus cache and generated files | ||
.docusaurus | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
# vitepress | ||
docs/.vitepress/dist | ||
cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { defineConfig } from 'vitepress' | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: "FAV0周刊", | ||
description: "FAV0周刊", | ||
lang: "zh-CH", //语言 | ||
lastUpdated: true, | ||
cleanUrls: true, | ||
ignoreDeadLinks: true, | ||
sitemap: { | ||
hostname: 'https://fav0.com' | ||
}, | ||
|
||
themeConfig: { | ||
// https://vitepress.dev/reference/default-theme-config | ||
outline: [2, 4], | ||
outlineTitle: "大纲", | ||
lastUpdatedText: "最近更新时间", | ||
nav: [ | ||
// { text: 'Home', link: '/' }, | ||
{ text: 'Posts', link: '/2024/000' } | ||
], | ||
|
||
sidebar: [ | ||
{ | ||
text: '2024', | ||
items: [ | ||
{ text: '000期--新的开始', link: '/2024/000' }, | ||
] | ||
} | ||
], | ||
|
||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/Justin3go/FAV0' } | ||
], | ||
search: { | ||
provider: "local", | ||
}, | ||
editLink: { | ||
pattern: "https://github.com/Justin3go/FAV0/edit/master/docs/:path", | ||
text: "在GitHub上编辑此页", | ||
}, | ||
returnToTopLabel: "回到顶部", | ||
sidebarMenuLabel: "目录", | ||
darkModeSwitchLabel: "深色模式", | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<template> | ||
<div class="comments"> | ||
<Giscus | ||
v-if="showComment" | ||
:repo="giscusConfig.repo" | ||
:repo-id="giscusConfig.repoId" | ||
:category="giscusConfig.category" | ||
:category-id="giscusConfig.categoryId" | ||
:mapping="giscusConfig.mapping" | ||
:reactions-enabled="giscusConfig.reactionsEnabled" | ||
:emit-metadata="giscusConfig.emitMetadata" | ||
:input-position="giscusConfig.inputPosition" | ||
:theme="isDark ? 'dark' : 'light'" | ||
:lang="giscusConfig.lang" | ||
:loading="giscusConfig.loading" | ||
:crossorigin="giscusConfig.crossorigin" | ||
/> | ||
</div> | ||
</template> | ||
<script lang="ts" setup> | ||
import { reactive, ref, watch, nextTick } from "vue"; | ||
import { useData, useRoute } from "vitepress"; | ||
import Giscus, { type GiscusProps } from '@giscus/vue' | ||
const route = useRoute(); | ||
const { isDark } = useData(); | ||
// params generate in https://giscus.app/zh-CN | ||
const giscusConfig: GiscusProps = reactive({ | ||
repo: "Justin3go/FAV0", | ||
repoId: "R_kgDOMAyo3w", | ||
category: "General", | ||
categoryId: "DIC_kwDOMAyo384Cfno-", | ||
mapping: "title", | ||
strict: "0", | ||
reactionsEnabled: "1", | ||
emitMetadata: "0", | ||
inputPosition: "top", | ||
// theme: isDark.value ? "dark" : "light", // 需要写在页面里面才会有响应式 | ||
lang: "zh-CN", | ||
loading: "lazy", | ||
crossorigin: "anonymous", | ||
}); | ||
const showComment = ref(true); | ||
watch( | ||
() => route.path, | ||
() => { | ||
showComment.value = false; | ||
nextTick(() => { | ||
showComment.value = true; | ||
}) | ||
}, | ||
{ | ||
immediate: true, | ||
} | ||
); | ||
</script> | ||
<style> | ||
.comments { | ||
padding: 20px; | ||
border-radius: 10px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<template></template> | ||
<script setup lang="ts"> | ||
import { onMounted } from "vue"; | ||
onMounted(() => { | ||
window.location.href = "/2024/000"; | ||
}); | ||
</script> | ||
<style scoped></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// https://vitepress.dev/guide/custom-theme | ||
import { h } from "vue"; | ||
import Theme from "vitepress/theme"; | ||
import Comment from "./components/Comment.vue"; | ||
|
||
export default { | ||
...Theme, | ||
Layout: () => { | ||
return h(Theme.Layout, null, { | ||
// https://vitepress.dev/guide/extending-default-theme#layout-slots | ||
"doc-after": () => h(Comment), | ||
}); | ||
}, | ||
// @ts-ignore | ||
enhanceApp({ app }) { | ||
app.component("Comment", Comment); | ||
}, | ||
}; | ||
|
Oops, something went wrong.