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 26 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
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: "20"
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"

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
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
}
}
]
}
50 changes: 50 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { defineConfig } from 'vitepress'

export default defineConfig({
title: 'yutto',
description: 'yutto docs',
themeConfig: {
nav: [
{ text: '首页', link: '/' },
{ text: '指引', link: '/guide/quick-start.html' },
{ text: '迁移', link: '/migration/' },
],

sidebar: {
'/guide': [
{
text: '',
items: [
{
text: '快速开始',
link: '/guide/quick-start.html',
},
{
text: '支持的链接',
link: '/guide/supported-links.html',
},
{
text: '命令行参数',
link: '/guide/cli.html',
},
],
},
],
},

footer: {
message: 'Released under the GPL3.0 License.',
copyright: 'Copyright © 2022-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' },
],
},
})
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>
44 changes: 44 additions & 0 deletions docs/.vitepress/theme/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* Colors
* -------------------------------------------------------------------------- */

:root {
--vp-c-brand: #29c9cf;
--vp-c-brand-light: #3fe0e0;
--vp-c-brand-lighter: #67e8e2;
--vp-c-brand-dark: #53aaf2;
--vp-c-brand-darker: #4586e1;
--vp-c-brand-dimm: rgba(100, 108, 255, 0.08);
}

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

:root {
--vp-button-brand-border: var(--vp-c-brand-light);
--vp-button-brand-text: var(--vp-c-text-dark-1);
--vp-button-brand-bg: var(--vp-c-brand);
--vp-button-brand-hover-border: var(--vp-c-brand-light);
--vp-button-brand-hover-text: var(--vp-c-text-dark-1);
--vp-button-brand-hover-bg: var(--vp-c-brand-light);
--vp-button-brand-active-border: var(--vp-c-brand-light);
--vp-button-brand-active-text: var(--vp-c-text-dark-1);
--vp-button-brand-active-bg: var(--vp-button-brand-bg);
}

/**
* Component: Custom Block
* -------------------------------------------------------------------------- */

:root {
--vp-custom-block-tip-border: var(--vp-c-brand);
--vp-custom-block-tip-text: var(--vp-c-brand-darker);
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
}

.dark {
--vp-custom-block-tip-border: var(--vp-c-brand);
--vp-custom-block-tip-text: var(--vp-c-brand-lighter);
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
}
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)
},
}
121 changes: 121 additions & 0 deletions docs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
Creative Commons Legal Code

CC0 1.0 Universal

CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.

Statement of Purpose

The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").

Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.

For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.

1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:

i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.

2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.

3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.

4. Limitations and Disclaimers.

a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
Loading