Skip to content

Commit

Permalink
feat: 新增 @readue/docs 包
Browse files Browse the repository at this point in the history
  • Loading branch information
lexmin0412 committed Apr 19, 2024
1 parent 44229ba commit 61df48c
Show file tree
Hide file tree
Showing 30 changed files with 18,939 additions and 3,782 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/deploy-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Deploy Rspress site to Pages

on:
push:
branches: [main]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- uses: pnpm/action-setup@v2 # pnpm is optional but recommended, you can also use npm / yarn
with:
version: 8
cache: pnpm
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: pnpm --filter=@readue/docs install
- name: Build with Rspress
run: |
pnpm --filter=@readue/docs run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: packages/docs/doc_build

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
17 changes: 17 additions & 0 deletions .readue/template.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ module.exports = {
* 输出文件路径 - 相对路径
*/
outputFile: './../README.md',
/**
* 自定义块配置
*/
blocks: {
/**
* 开启自定义配置
*/
type: 'custom',
/**
* 自定义块插件列表
*/
list: [
"@readue/block-base_info",
"@readue/block-packages",
"@readue/block-star_history",
]
}
}
```

Expand Down
25 changes: 25 additions & 0 deletions packages/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
doc_build
3 changes: 3 additions & 0 deletions packages/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @readue/docs

undefined
7 changes: 7 additions & 0 deletions packages/docs/docs/en/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"text": "guide",
"link": "/guide/start/introduction",
"activeMatch": "/guide/"
}
]
7 changes: 7 additions & 0 deletions packages/docs/docs/en/guide/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"type": "dir",
"name": "start",
"label": "start"
}
]
12 changes: 12 additions & 0 deletions packages/docs/docs/en/guide/start/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"type": "file",
"name": "introduction",
"label": "introduction"
},
{
"type": "file",
"name": "quick-start",
"label": "quick-start"
}
]
3 changes: 3 additions & 0 deletions packages/docs/docs/en/guide/start/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Introduction

Main body.
3 changes: 3 additions & 0 deletions packages/docs/docs/en/guide/start/quick-start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Quick Start

Main body.
3 changes: 3 additions & 0 deletions packages/docs/docs/en/guide/usage/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Usage

Main body.
36 changes: 36 additions & 0 deletions packages/docs/docs/en/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
pageType: home

hero:
name: Readue
text: 一键生成你的项目 README 文档
actions:
- theme: brand
text: Quick Start
link: /guide/start/quick-start
- theme: alt
text: Github
link: https://github.com/lexmin0412/readue
image:
src: https://lexmin0412.github.io/readue/rspress-icon.png
alt: Readue Logo
features:
- title: Blazing fast build speed
details: The core compilation module is based on the Rust front-end toolchain, providing a more ultimate development experience.
icon: 🏃🏻‍♀️
- title: Support for MDX content writing
details: MDX is a powerful way to write content, allowing you to use React components in Markdown.
icon: 📦
- title: Built-in full-text search
details: Automatically generates a full-text search index for you during construction, providing out-of-the-box full-text search capabilities.
icon: 🎨
- title: Simpler I18n solution
details: With the built-in I18n solution, you can easily provide multi-language support for documents or components.
icon: 🌍
- title: Static site generation
details: In production, it automatically builds into static HTML files, which can be easily deployed anywhere.
icon: 🌈
- title: Providing multiple custom capabilities
details: Through its extension mechanism, you can easily extend theme UI and build process.
icon: 🔥
---
Binary file added packages/docs/docs/public/rspress-dark-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/docs/docs/public/rspress-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/docs/docs/public/rspress-light-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions packages/docs/docs/zh/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"text": "guide",
"link": "/guide/start/introduction",
"activeMatch": "/guide/"
}
]
7 changes: 7 additions & 0 deletions packages/docs/docs/zh/guide/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"type": "dir",
"name": "start",
"label": "start"
}
]
12 changes: 12 additions & 0 deletions packages/docs/docs/zh/guide/start/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"type": "file",
"name": "introduction",
"label": "introduction"
},
{
"type": "file",
"name": "quick-start",
"label": "quick-start"
}
]
3 changes: 3 additions & 0 deletions packages/docs/docs/zh/guide/start/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 介绍

正文。
3 changes: 3 additions & 0 deletions packages/docs/docs/zh/guide/start/quick-start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 快速开始

正文。
3 changes: 3 additions & 0 deletions packages/docs/docs/zh/guide/usage/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 用法

正文。
36 changes: 36 additions & 0 deletions packages/docs/docs/zh/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
pageType: home

hero:
name: Readue
text: 一键生成你的项目 README 文档
actions:
- theme: brand
text: Quick Start
link: /guide/start/quick-start
- theme: alt
text: Github
link: https://github.com/lexmin0412/readue
image:
src: https://lexmin0412.github.io/readue/rspress-icon.png
alt: Readue Logo
features:
- title: Blazing fast build speed
details: The core compilation module is based on the Rust front-end toolchain, providing a more ultimate development experience.
icon: 🏃🏻‍♀️
- title: Support for MDX content writing
details: MDX is a powerful way to write content, allowing you to use React components in Markdown.
icon: 📦
- title: Built-in full-text search
details: Automatically generates a full-text search index for you during construction, providing out-of-the-box full-text search capabilities.
icon: 🎨
- title: Simpler I18n solution
details: With the built-in I18n solution, you can easily provide multi-language support for documents or components.
icon: 🌍
- title: Static site generation
details: In production, it automatically builds into static HTML files, which can be easily deployed anywhere.
icon: 🌈
- title: Providing multiple custom capabilities
details: Through its extension mechanism, you can easily extend theme UI and build process.
icon: 🔥
---
18 changes: 18 additions & 0 deletions packages/docs/i18n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"guide": {
"zh": "指南",
"en": "Guide"
},
"start": {
"zh": "开始",
"en": "Start"
},
"introduction": {
"zh": "介绍",
"en": "Introduction"
},
"quick-start": {
"zh": "快速开始",
"en": "Quick Start"
}
}
16 changes: 16 additions & 0 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "@readue/docs",
"version": "0.2.0",
"private": true,
"scripts": {
"dev": "rspress dev",
"build": "rspress build",
"preview": "rspress preview"
},
"dependencies": {
"rspress": "^0.1.1"
},
"devDependencies": {
"@types/node": "^14"
}
}
Loading

0 comments on commit 61df48c

Please sign in to comment.