Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 docs: move readme contents to static document #86

Merged
merged 46 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7d5ed41
📝 docs: initial docs
SigureMo Jul 9, 2022
bcd192b
💄 chore: update styles
SigureMo Jul 9, 2022
1d82b1a
⬆️ deps: bump deps
SigureMo Jul 13, 2022
c5f3327
🔧 chore: update edit link
SigureMo Jul 13, 2022
a8ee635
⬆️ deps: upgrade to vitepress@1.0.6
SigureMo Aug 17, 2022
80f97ca
⬆️ deps: bump moefy-canvas
SigureMo Sep 12, 2022
54a0708
Merge branch 'main' into docs
SigureMo Sep 14, 2022
5de72c4
Merge branch 'main' into docs
SigureMo Dec 16, 2022
6feb814
use built-in Badge
SigureMo Dec 16, 2022
e41045e
⬆️ deps: bump deps
SigureMo Dec 16, 2022
f30139f
🥅 chore: refine error msg (fixes #99)
SigureMo Dec 20, 2022
ca1e7c1
Merge branch 'main' into docs
SigureMo Dec 20, 2022
f419753
🔀 chore: merge branch 'main' into docs
SigureMo Feb 6, 2023
d28ea7f
Merge branch 'main' into docs
SigureMo Oct 22, 2023
45fba4d
📝 docs: update to vitepress 1.0.0-rc
SigureMo Oct 22, 2023
204d7d0
🐛 fix: fix workdir
SigureMo Oct 22, 2023
22b695f
Merge branch 'main' into docs
SigureMo Dec 20, 2023
2d860db
🍱 docs: add logo
SigureMo Dec 20, 2023
be3bcf9
Merge branch 'main' into docs
SigureMo Mar 30, 2024
8d8f3bc
⬆️ deps: bump deps
SigureMo Mar 30, 2024
796898d
Merge branch 'main' into docs
SigureMo Aug 23, 2024
84b9737
Merge branch 'main' into docs
SigureMo Oct 2, 2024
ebc8d0e
Merge branch 'main' into docs
SigureMo Oct 2, 2024
5e55cde
⬆️ deps: bump deps
SigureMo Oct 2, 2024
8fb24ca
Merge branch 'main' into docs
SigureMo Oct 2, 2024
c8d08d1
Merge branch 'main' into docs
SigureMo Feb 1, 2025
ab5eb2e
🍱 docs: move logo
SigureMo Feb 1, 2025
d21d56e
⬆️ deps: bump deps
SigureMo Feb 1, 2025
8547f23
🔨 chore: add serve command
SigureMo Feb 1, 2025
d117385
⬆️ deps: bump moefy-canvas to 0.6.0
SigureMo Feb 2, 2025
6c6165e
Merge branch 'main' into docs
SigureMo Feb 2, 2025
c826f96
💄 chore: update colors
SigureMo Feb 2, 2025
5f8ded3
📝 docs: update some contents
SigureMo Feb 3, 2025
7d39fc7
📝 docs: add `基础参数` part
SigureMo Feb 4, 2025
986fd37
📝 docs: complete basic structure
SigureMo Feb 4, 2025
001c298
🍱 docs: add a mini icon for sample code icon and favicon
SigureMo Feb 4, 2025
2ce0dad
📝 docs: cleanup content in README
SigureMo Feb 4, 2025
d7758c5
🍱 docs: use logo in nav bar
SigureMo Feb 4, 2025
5c7764a
🐛 fix: deadlink in build
SigureMo Feb 4, 2025
93ff7a4
📝 docs: remove color makers, github cant render it
SigureMo Feb 4, 2025
7622ddb
📝 docs: add argument mapping for migration
SigureMo Feb 4, 2025
9d6309b
🐛 fix: dont use `index.md` to avoid vitepress isActive bug
SigureMo Feb 4, 2025
040994c
💄 chore: refine color for dark mode
SigureMo Feb 4, 2025
9a39a53
⬆️ deps: bump vitepress
SigureMo Feb 4, 2025
60740fb
🎉 chore: ready for merge
SigureMo Feb 4, 2025
2c6f5cc
📝 docs: mark todo as done
SigureMo Feb 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/lint-and-fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,31 @@
working-directory: packages/biliass/rust
run: |
cargo clippy --all-targets --all-features -- -D warnings

lint-and-fmt-docs:
name: Lint and Format (Docs)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
Dismissed Show dismissed Hide dismissed
with:
package_json_file: "docs/package.json"
version: "latest"

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "22"
cache: "pnpm"
cache-dependency-path: "docs/pnpm-lock.yaml"

- name: Install dependencies
working-directory: ./docs
run: pnpm i --frozen-lockfile

- name: Format check
working-directory: ./docs
run: pnpm fmt:check
Comment on lines +79 to +104

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
53 changes: 53 additions & 0 deletions .github/workflows/vitepress-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: VitePress Deploy

on:
push:
branches: [main]
pull_request:
merge_group:
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true

- name: Install pnpm
uses: pnpm/action-setup@v2
Dismissed Show dismissed Hide dismissed
with:
package_json_file: "docs/package.json"
version: "latest"

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "22"
cache: "pnpm"
cache-dependency-path: "docs/pnpm-lock.yaml"

- name: Install dependencies
working-directory: ./docs
run: pnpm i --frozen-lockfile

- name: Build VitePress site
working-directory: ./docs
run: pnpm build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Fixed Show fixed Hide fixed

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'VitePress Deploy' step
Uses Step
uses 'peaceiris/actions-gh-pages' with ref 'v3', not a pinned commit hash
# if: github.ref == 'refs/heads/main' # Uncomment this before merge this PR
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_dir: docs/.vitepress/dist
external_repository: SigureMo/docs
publish_branch: yutto
force_orphan: true
commit_message: ":rocket: deploy: "
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yutto<sup>2.0.0</sup>

<p align="center">
<img src="./logo/logo.png" width="400px">
<img src="./docs/public/logo.png" width="400px">
</p>

<p align="center">
Expand Down
8 changes: 8 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules
.temp
.cache
dist/
lib/
*.tsbuildinfo
.DS_Store
.vitepress/cache
6 changes: 6 additions & 0 deletions docs/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.html
dist/
node_modules/
*.min.js
lib/*
pnpm-lock.yaml
22 changes: 22 additions & 0 deletions docs/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"printWidth": 100,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "es5",
"semi": false,
"arrowParens": "always",
"overrides": [
{
"files": "*.md",
"options": {
"tabWidth": 3
}
},
{
"files": "*.json5",
"options": {
"singleQuote": false
}
}
]
}
112 changes: 112 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import { defineConfig } from 'vitepress'

export default defineConfig({
lang: 'zh-CN',
title: 'yutto',
description: '🧊 yutto,一个可爱且任性的 B 站下载器(CLI)',
cleanUrls: true,
themeConfig: {
nav: [
{ text: '首页', link: '/' },
{ text: '指南', link: '/guide/quick-start' },
{ text: '参考', link: '/reference/cli' },
{ text: '迁移', link: '/migration/' },
{
text: '支持我',
items: [
{ text: '赞助', link: '/sponsor' },
{
text: '参与贡献',
link: 'https://github.com/yutto-dev/yutto/blob/main/CONTRIBUTING.md',
},
],
},
],

sidebar: {
'/guide': [
{
text: '开始',
items: [
{
text: '快速开始',
link: '/guide/quick-start',
},
{
text: '支持的链接',
link: '/guide/supported-links',
},
],
collapsed: false,
},
{
text: 'FAQ',
link: '/guide/faq',
},
{
text: '交流和反馈',
link: '/guide/feedback',
},
{
text: '注意事项',
link: '/guide/notice',
},
{
text: '特别感谢',
link: '/guide/thanks',
},
],
'/reference': [
{
text: '参考',
items: [
{
text: '命令行参数',
link: '/reference/cli',
},
{
text: '配置',
link: '/reference/config',
},
{
text: '详细参数',
items: [
{
text: '基础参数',
link: '/reference/arguments-basic',
},
{
text: '批量参数',
link: '/reference/arguments-batch',
},
{
text: '弹幕参数',
link: '/reference/arguments-danmaku',
},
],
},
],
},
],
},

footer: {
message: 'Released under the GPL3.0 License.',
copyright: 'Copyright © 2025-present Nyakku Shigure',
},

editLink: {
pattern: 'https://github.com/yutto-dev/yutto/edit/main/docs/:path',
text: '为此页提供修改建议',
},

socialLinks: [
{ icon: 'github', link: 'https://github.com/yutto-dev/yutto' },
{ icon: 'discord', link: 'https://discord.gg/5cQGyFwsqC' },
],

search: {
provider: 'local',
},
},
})
6 changes: 6 additions & 0 deletions docs/.vitepress/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare module '*.vue' {
import type { DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}
11 changes: 11 additions & 0 deletions docs/.vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<script setup lang="ts">
import DefaultTheme from 'vitepress/theme'
import Sparkler from './components/Sparkler.vue'

const { Layout } = DefaultTheme
</script>

<template>
<Layout />
<Sparkler />
</template>
28 changes: 28 additions & 0 deletions docs/.vitepress/theme/components/Sparkler.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<script setup lang="ts">
import { ref, onMounted, onBeforeUnmount } from 'vue'
import { MAX_Z_INDEX } from '@moefy-canvas/core'
import { Sparkler, SparklerMode } from '@moefy-canvas/theme-sparkler'

const el = ref(null)
const sparkler = new Sparkler(
{
mode: SparklerMode.TRAIL,
},
{
opacity: 1,
zIndex: MAX_Z_INDEX,
}
)

onMounted(() => {
sparkler.mount(el.value!)
})

onBeforeUnmount(() => {
sparkler.unmount()
})
</script>

<template>
<canvas ref="el"></canvas>
</template>
23 changes: 23 additions & 0 deletions docs/.vitepress/theme/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Colors
* -------------------------------------------------------------------------- */

:root {
--vp-c-brand-1: #31b1b1;
--vp-c-brand-2: #29c5ca;
--vp-c-brand-3: #67e8e2;
--vp-c-brand-soft: #29c9cf33;
}

/**
* Component: Button
* -------------------------------------------------------------------------- */

:root {
--vp-button-brand-text: var(--vp-c-bg-soft);
--vp-button-brand-bg: var(--vp-c-brand-2);
--vp-button-brand-hover-text: var(--vp-c-bg-soft);
--vp-button-brand-hover-bg: var(--vp-c-brand-3);
--vp-button-brand-active-text: var(--vp-c-bg-soft);
--vp-button-brand-active-bg: var(--vp-c-brand-2);
}
13 changes: 13 additions & 0 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { EnhanceAppContext } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import Layout from './Layout.vue'
import './index.css'

export default {
...DefaultTheme,
Layout,
enhanceApp(ctx: EnhanceAppContext) {
// extend default theme custom behaviour.
DefaultTheme.enhanceApp(ctx)
},
}
Loading