-
Notifications
You must be signed in to change notification settings - Fork 138
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
rr210
committed
Aug 4, 2022
1 parent
04d58f5
commit e725768
Showing
147 changed files
with
7,559 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -22,4 +22,3 @@ thd | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
docs/docs |
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,43 @@ | ||
/* | ||
* @Author: Harry | ||
* @Date: 2022-07-30 21:56:16 | ||
* @LastEditors: harry | ||
* @Github: https://github.com/rr210 | ||
* @LastEditTime: 2022-07-31 11:35:36 | ||
* @FilePath: \dev\docs\docs\.vitepress\config.js | ||
*/ | ||
import { sidebar, nav, head, markdown } from './configs/index' | ||
export default { | ||
// 网站标题 | ||
title: 'Blazeb2 图床', | ||
// 网站描述 | ||
description: '📷基于 backBlazeb2 API & ⚡ cloudflare 开发的具有 CDN 加速功能的图床工具', | ||
head, | ||
markdown, | ||
themeConfig: { | ||
// 顶部右上角导航 | ||
nav, | ||
// 左侧导航 | ||
sidebar, | ||
logo: '/img/logo.svg', | ||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/rr210/blazeb2' } | ||
], | ||
algolia: { | ||
apiKey: '96df3907aa74556f4746511deee28203', | ||
indexName: 'BlazeB2', | ||
}, | ||
//丝滑滚动 | ||
smoothScroll: true, | ||
// 启用时间线 | ||
editLinks: true, | ||
//在git上编辑提示文字 | ||
editLinkText: '在 GitHub 上编辑此页', | ||
// 获取每个文件最后一次 git 提交的 UNIX 时间戳(ms),同时它将以合适的日期格式显示在每一页的底部 | ||
lastUpdated: '上次更新', | ||
footer: { | ||
message: 'Released under the Apache License 2.0.', | ||
copyright: 'Copyright © 2021-present Harry' | ||
} | ||
} | ||
} |
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,17 @@ | ||
/* | ||
* @Author: Harry | ||
* @Date: 2022-07-31 10:31:30 | ||
* @LastEditors: harry | ||
* @Github: https://github.com/rr210 | ||
* @LastEditTime: 2022-07-31 21:12:07 | ||
* @FilePath: \dev\docs\docs\.vitepress\configs\head.js | ||
*/ | ||
export const head = [ | ||
['link', { rel: 'icon', href: '/favicon.ico' }], | ||
["meta", { name: "keywords", content: "BlazeB2图床" }], | ||
[ | ||
"link", | ||
{ rel: "stylesheet", href: "https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css" }, | ||
], | ||
["script", { src: "https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/fancybox.umd.js" }] | ||
] |
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,16 @@ | ||
/* | ||
* @Author: Harry | ||
* @Date: 2022-07-31 10:32:34 | ||
* @LastEditors: harry | ||
* @Github: https://github.com/rr210 | ||
* @LastEditTime: 2022-07-31 11:35:17 | ||
* @FilePath: \dev\docs\docs\.vitepress\configs\index.js | ||
*/ | ||
import { sidebar } from './sidebar' | ||
import { nav } from './nav' | ||
import { head } from './head' | ||
import { markdown } from './markdown' | ||
|
||
export { | ||
sidebar, nav, head, markdown | ||
} |
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,20 @@ | ||
/* | ||
* @Author: Harry | ||
* @Date: 2022-07-31 11:12:10 | ||
* @LastEditors: harry | ||
* @Github: https://github.com/rr210 | ||
* @LastEditTime: 2022-07-31 12:37:11 | ||
* @FilePath: \dev\docs\docs\.vitepress\configs\markdown.js | ||
*/ | ||
import mdItCustomAttrs from 'markdown-it-custom-attrs' | ||
export const markdown = { | ||
// options for markdown-it-toc-done-right | ||
toc: { level: [1, 2, 3] }, | ||
|
||
config: (md) => { | ||
// use more markdown-it plugins! | ||
md.use(mdItCustomAttrs, 'image', { | ||
'data-fancybox': "gallery" | ||
}) | ||
} | ||
} |
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,17 @@ | ||
/* | ||
* @Author: Harry | ||
* @Date: 2022-07-30 21:56:58 | ||
* @LastEditors: harry | ||
* @Github: https://github.com/rr210 | ||
* @LastEditTime: 2022-07-31 14:13:40 | ||
* @FilePath: \dev\docs\docs\.vitepress\configs\nav.js | ||
*/ | ||
|
||
export const nav = [ | ||
{ | ||
text: '在线使用', items: [ | ||
{ text: "推荐较快", link: 'https://blazeb2.mr90.cf/' }, | ||
{ text: "镜像站点", link: 'https://b2.mr90.top/' }, | ||
] | ||
} | ||
] |
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,50 @@ | ||
/* | ||
* @Author: Harry | ||
* @Date: 2022-07-30 21:57:08 | ||
* @LastEditors: harry | ||
* @Github: https://github.com/rr210 | ||
* @LastEditTime: 2022-07-31 14:11:58 | ||
* @FilePath: \dev\docs\docs\.vitepress\configs\sidebar.js | ||
*/ | ||
// const { getPath } = require('./utils') | ||
|
||
export const sidebar = { | ||
'/guide/': getGuideSidebar() | ||
} | ||
function getGuideSidebar() { | ||
return [ | ||
{ | ||
text: '文档指南', | ||
collapsible: true, | ||
// collapsed: true, | ||
items: [ | ||
{ text: '概述', link: '/guide/summary' }, | ||
{ text: '开始使用', link: '/guide/prepare' }, | ||
{ text: '环境配置', link: '/guide/environment' }, | ||
{ text: '图床配置', link: '/guide/config' } | ||
] | ||
}, | ||
{ | ||
text: '项目部署', | ||
collapsible: true, | ||
// collapsed: true, | ||
items: [ | ||
{ text: 'Vercel部署', link: '/guide/deploy/vercel' }, | ||
{ text: 'Docker部署', link: '/guide/deploy/docker' }, | ||
{ text: 'Heroku部署', link: '/guide/deploy/heroku' }, | ||
{ text: 'Serverless部署', link: '/guide/deploy/serverless' } | ||
] | ||
}, | ||
{ | ||
text: '贡献指南', | ||
collapsible: true, | ||
// collapsed: true, | ||
items: [ | ||
{ text: '开始贡献', link: '/guide/contribution/start' }, | ||
{ text: '常见问题', link: '/guide/contribution/issue' }, | ||
{ text: '关于更新', link: '/guide/contribution/update' } | ||
] | ||
} | ||
] | ||
} | ||
|
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,39 @@ | ||
<!-- | ||
* @Author: Harry | ||
* @Date: 2022-07-31 20:52:35 | ||
* @LastEditors: harry | ||
* @Github: https://github.com/rr210 | ||
* @LastEditTime: 2022-07-31 21:12:27 | ||
* @FilePath: \dev\docs\docs\.vitepress\theme\components\Comment.vue | ||
--> | ||
<template> | ||
<div id="gitalk-container"></div> | ||
</template> | ||
|
||
<script> | ||
import 'gitalk/dist/gitalk.css' | ||
import Gitalk from 'gitalk' | ||
export default { | ||
name: "blog-comments", | ||
mounted() { | ||
const commentConfig = { | ||
// 是否开启 | ||
enable: true, | ||
// clientID | ||
clientID: "015c12dc1e5de1413425", | ||
// clientSecret | ||
clientSecret: "4c4dcc532189d7716296c80cebe6775e9557f70f", | ||
// 评论项目名 | ||
repo: 'blazeb2', | ||
owner: 'rr210', | ||
admin: ['rr210'], | ||
githubID: 'rr210', | ||
id: decodeURI(window.location.pathname), | ||
language: 'zh-CN', | ||
distractionFreeMode: true | ||
}; | ||
const gitalk = new Gitalk(commentConfig); | ||
gitalk.render("gitalk-container"); | ||
}, | ||
}; | ||
</script> |
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,60 @@ | ||
<script setup lang="ts"> | ||
import { provide } from 'vue' | ||
import { useSidebar, useCloseSidebarOnEscape } from './composables/sidebar' | ||
import VPSkipLink from './components/VPSkipLink.vue' | ||
import VPBackdrop from './components/VPBackdrop.vue' | ||
import VPNav from './components/VPNav.vue' | ||
import VPLocalNav from './components/VPLocalNav.vue' | ||
import VPSidebar from './components/VPSidebar.vue' | ||
import VPContent from './components/VPContent.vue' | ||
import VPFooter from './components/VPFooter.vue' | ||
const { | ||
isOpen: isSidebarOpen, | ||
open: openSidebar, | ||
close: closeSidebar | ||
} = useSidebar() | ||
useCloseSidebarOnEscape(isSidebarOpen, closeSidebar) | ||
provide('close-sidebar', closeSidebar) | ||
</script> | ||
|
||
<template> | ||
<div class="Layout"> | ||
<slot name="layout-top" /> | ||
<VPSkipLink /> | ||
<VPBackdrop class="backdrop" :show="isSidebarOpen" @click="closeSidebar" /> | ||
<VPNav /> | ||
<VPLocalNav :open="isSidebarOpen" @open-menu="openSidebar" /> | ||
<VPSidebar :open="isSidebarOpen" /> | ||
|
||
<VPContent> | ||
<template #home-hero-before><slot name="home-hero-before" /></template> | ||
<template #home-hero-after><slot name="home-hero-after" /></template> | ||
<template #home-features-before><slot name="home-features-before" /></template> | ||
<template #home-features-after><slot name="home-features-after" /></template> | ||
|
||
<template #doc-before><slot name="doc-before" /></template> | ||
<template #doc-after><slot name="doc-after" /></template> | ||
|
||
<template #aside-top><slot name="aside-top" /></template> | ||
<template #aside-bottom><slot name="aside-bottom" /></template> | ||
<template #aside-outline-before><slot name="aside-outline-before" /></template> | ||
<template #aside-outline-after><slot name="aside-outline-after" /></template> | ||
<template #aside-ads-before><slot name="aside-ads-before" /></template> | ||
<template #aside-ads-after><slot name="aside-ads-after" /></template> | ||
</VPContent> | ||
|
||
<VPFooter /> | ||
<slot name="layout-bottom" /> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.Layout { | ||
display: flex; | ||
flex-direction: column; | ||
min-height: 100vh; | ||
} | ||
</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,84 @@ | ||
<script setup lang="ts"> | ||
import { useData } from 'vitepress' | ||
const { site } = useData() | ||
</script> | ||
|
||
<template> | ||
<div class="NotFound"> | ||
<p class="code">404</p> | ||
<h1 class="title">PAGE NOT FOUND</h1> | ||
<div class="divider" /> | ||
<blockquote class="quote"> | ||
But if you don't change your direction, and if you keep looking, you may end up where you are heading. | ||
</blockquote> | ||
|
||
<div class="action"> | ||
<a class="link" :href="site.base" aria-label="go to home"> | ||
Take me home | ||
</a> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.NotFound { | ||
padding: 64px 24px 96px; | ||
text-align: center; | ||
} | ||
@media (min-width: 768px) { | ||
.NotFound { | ||
padding: 96px 32px 168px; | ||
} | ||
} | ||
.code { | ||
line-height: 64px; | ||
font-size: 64px; | ||
font-weight: 600; | ||
} | ||
.title { | ||
padding-top: 12px; | ||
letter-spacing: 2px; | ||
line-height: 20px; | ||
font-size: 20px; | ||
font-weight: 700; | ||
} | ||
.divider { | ||
margin: 24px auto 18px; | ||
width: 64px; | ||
height: 1px; | ||
background-color: var(--vp-c-divider) | ||
} | ||
.quote { | ||
margin: 0 auto; | ||
max-width: 256px; | ||
font-size: 14px; | ||
font-weight: 500; | ||
color: var(--vp-c-text-2); | ||
} | ||
.action { | ||
padding-top: 20px; | ||
} | ||
.link { | ||
display: inline-block; | ||
border: 1px solid var(--vp-c-brand); | ||
border-radius: 16px; | ||
padding: 3px 16px; | ||
font-size: 14px; | ||
font-weight: 500; | ||
color: var(--vp-c-brand); | ||
transition: border-color 0.25s, color .25s; | ||
} | ||
.link:hover { | ||
border-color: var(--vp-c-brand-dark); | ||
color: var(--vp-c-brand-dark); | ||
} | ||
</style> |
Oops, something went wrong.