Skip to content

Commit

Permalink
✨ feat: 提交文档分支
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyu1998 committed Aug 15, 2024
1 parent 3b9efa2 commit 61f5ed7
Show file tree
Hide file tree
Showing 122 changed files with 5,283 additions and 8,777 deletions.
7 changes: 7 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/build
/dist
/node_modules
/resources
/assets
/.gitignore
/.eslintignore
1 change: 1 addition & 0 deletions .git-ftp-include
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!./.vitepress/dist
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

.vitepress/config.ts -linguist-detectable
.vitepress/theme/custom.css -llinguist-detectable
.vitepress/theme/index.ts -llinguist-detectable
.vitepress/theme/utils.ts -llinguist-detectable
.vitepress/theme/serverUtils.ts -llinguist-detectable

79 changes: 0 additions & 79 deletions .github/ISSUE_TEMPLATE/bug.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/ISSUE_TEMPLATE/feature.yml

This file was deleted.

26 changes: 5 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@

.cache/
coverage/
dist/*
!dist/index.html
node_modules/
*.log
# Build and Release Folders
node_modules
.vitepress/dist
.vitepress/cache
.DS_Store
# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
.idea
.history
package-lock.json
pnpm-lock.yaml
yarn.lock
.prettierrc.json
.vscode
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
strict-peer-dependencies=false
109 changes: 109 additions & 0 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
import { getPosts, getPostLength } from "./theme/serverUtils";
import { buildBlogRSS } from "./theme/rss";
import { transformerTwoslash } from "@shikijs/vitepress-twoslash";
import mathjax3 from "markdown-it-mathjax3";

async function config() {
return {
lang: "en-US",
title: "R-Plugin",
description: "Home of R-Plugin",
head: [
[
"link",
{
rel: "icon",
type: "image/svg",
href: "/horse.svg",
},
],
[
"meta",
{
name: "author",
content: "zhiyu1998",
},
],
[
"meta",
{
property: "og:title",
content: "Home",
},
],
[
"meta",
{
property: "og:description",
content: "Home of zhiyu1998",
},
],
],
// cleanUrls: "with-subfolders",
lastUpdated: false,
themeConfig: {
// repo: "clark-cui/homeSite",
logo: "/horse.svg",
avator: "/avator.png",
search: {
provider: "local",
},
docsDir: "/",
// docsBranch: "master",
posts: await getPosts(),
pageSize: 5,
postLength: await getPostLength(),
nav: [
{
text: "🏡Home",
link: "/",
},
{
text: "🔖Tags",
link: "/tags",
},
{
text: "📃Archives",
link: "/archives",
},
{
text: "🔥RSS",
link: "https://clark-cui.top/feed.xml",
},
],
socialLinks: [
{ icon: "github", link: "https://github.com/zhiyu1998" },
{ icon: "twitter", link: "https://x.com/FCpwwlNWAriPe9k" },
{
icon: {
svg: `<svg role="img" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="20">
<path d="M874.666667 375.189333V746.666667a64 64 0 0 1-64 64H213.333333a64 64 0 0 1-64-64V375.189333l266.090667 225.6a149.333333 149.333333 0 0 0 193.152 0L874.666667 375.189333zM810.666667 213.333333a64.789333 64.789333 0 0 1 22.826666 4.181334 63.616 63.616 0 0 1 26.794667 19.413333 64.32 64.32 0 0 1 9.344 15.466667c2.773333 6.570667 4.48 13.696 4.906667 21.184L874.666667 277.333333v21.333334L553.536 572.586667a64 64 0 0 1-79.893333 2.538666l-3.178667-2.56L149.333333 298.666667v-21.333334a63.786667 63.786667 0 0 1 35.136-57.130666A63.872 63.872 0 0 1 213.333333 213.333333h597.333334z" ></path>
</svg>`,
},
link: "mailto:renzhiyu0416@gmail.com",
},
],
// outline: 2, //设置右侧aside显示层级
aside: false,
// blogs page show firewokrs animation
showFireworksAnimation: false,
},
buildEnd: buildBlogRSS,
markdown: {
theme: {
light: "vitesse-light",
dark: "vitesse-dark",
},
codeTransformers: [transformerTwoslash()],
config: (md) => {
md.use(mathjax3);
},
},
// vite: {
// ssr: {
// noExternal: ["vitepress-plugin-twoslash"],
// },
// },
};
}
export default config();
65 changes: 65 additions & 0 deletions .vitepress/theme/components/Archives.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<template>
<div class="main">
<div v-for="yearList in data" class="yearItem">
<div class="year">
{{ yearList[0].frontMatter.date.split("-")[0] }}
</div>
<a
:href="withBase(article.regularPath)"
v-for="(article, index) in yearList"
:key="index"
class="article"
>
<div class="title">
<div class="title-o"></div>
{{ article.frontMatter.title }}
</div>
<div class="date">{{ article.frontMatter.date.slice(5) }}</div>
</a>
</div>
</div>
</template>

<script lang="ts" setup>
import { useData, withBase } from "vitepress";
import { computed } from "vue";
import { useYearSort } from "../utils";
const { theme } = useData();
const data = computed(() => useYearSort(theme.value.posts));
</script>

<style scoped>
.main {
margin: 0 auto;
padding: 0.5rem 1.5rem 4rem;
max-width: 48rem;
}
.yearItem {
border-bottom: 1px dashed #c7c7c7;
}
.yearItem:last-child {
border: none;
}
.year {
padding: 16px 0 8px 0;
font-size: 1.2rem;
font-weight: 600;
}
.article {
display: flex;
align-items: center;
justify-content: space-between;
margin: 10px 10px;
color: var(--vp-c-text-2);
transition: border 0.3s ease, color 0.3s ease;
}
.article:hover {
text-decoration: none;
color: var(--vp-c-brand);
}
.date {
font-family: Georgia, sans-serif;
}
</style>
Loading

0 comments on commit 61f5ed7

Please sign in to comment.