Skip to content

Commit

Permalink
docs: optimize docs (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
kagol authored Aug 15, 2024
1 parent 694e152 commit 147c913
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 12 deletions.
48 changes: 46 additions & 2 deletions packages/docs/fluent-editor/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ import { demoPreviewPlugin } from '@vitepress-code-preview/plugin'
import { sidebar } from './sidebar'

export default defineConfig({
title: 'FluentEditor',
description: '富文本编辑器, Rich text editor, rich-text-editor, rich-text, wysiwyg, wysiwyg-editor, fluent-editor',
title: 'Fluent Editor',
titleTemplate: '基于 Quill 2.0 的富文本编辑器',
description: '富文本编辑器, Rich text editor, rich-text-editor, rich-text, wysiwyg, wysiwyg-editor, quill, fluent-editor',
base: '/fluent-editor/',
cleanUrls: true,
head: [
['link', { rel: 'icon', href: 'favicon.ico' }]
],
themeConfig: {
logo: 'logo.svg',
nav: [
{ text: '文档', link: '/docs/quick-start', activeMatch: '/docs/' },
{
Expand All @@ -23,6 +28,45 @@ export default defineConfig({
],
sidebar: {
'/docs/': sidebar(),
},
footer: {
message: 'Made with ❤ by',
copyright: '<a href="https://opentiny.design/" target="_blank">OpenTiny</a> and his friends'
},
outline: {
label: '本页目录'
},
sidebarMenuLabel: '菜单',
returnToTopLabel: '返回顶部',
docFooter: {
prev: '上一篇',
next: '下一篇'
},
search: {
provider: 'local',
options: {
translations: {
button: {
buttonText: '搜索',
buttonAriaLabel: '搜索'
},
modal: {
displayDetails: '显示详情',
resetButtonTitle: '重置',
backButtonTitle: '关闭搜索',
noResultsText: '无相关结果',
footer: {
selectText: '选择',
selectKeyAriaLabel: 'Enter',
navigateText: '切换',
navigateUpKeyAriaLabel: '向上箭头',
navigateDownKeyAriaLabel: '向下箭头',
closeText: '关闭',
closeKeyAriaLabel: 'ESC'
}
}
}
}
}
},
markdown: {
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/fluent-editor/demos/basic-usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ onMounted(() => {

<template>
<div id="editor">
<p>Hello <strong>FluentEditor</strong>!</p>
<p>Hello <strong>Fluent Editor</strong>!</p>
</div>
</template>
6 changes: 3 additions & 3 deletions packages/docs/fluent-editor/docs/quick-start.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 快速开始

安装 FluentEditor
安装 Fluent Editor

```shell
npm i @opentiny/fluent-editor
Expand All @@ -10,7 +10,7 @@ npm i @opentiny/fluent-editor

```html
<div id="editor">
<p>Hello FluentEditor!</p>
<p>Hello Fluent Editor!</p>
</div>
```

Expand All @@ -20,7 +20,7 @@ npm i @opentiny/fluent-editor
@import '@opentiny/fluent-editor/dist/style.css'
```

初始化 FluentEditor 编辑器:
初始化 Fluent Editor 编辑器:

```javascript
import FluentEditor from '@opentiny/fluent-editor'
Expand Down
19 changes: 13 additions & 6 deletions packages/docs/fluent-editor/index.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@
---
layout: home
hero:
name: FluentEditor
name: Fluent Editor
text:
tagline: 一个基于 Quill 2.0 的富文本编辑器,在 Quill 基础上扩展了丰富的模块和格式,功能强大、开箱即用。
actions:
- theme: brand
text: 快速开始
text: 开始
link: /docs/quick-start
- theme: alt
text: GitHub
link: https://github.com/opentiny/fluent-editor
features:
- title: 开箱即用
- icon: 📦
title: 开箱即用
details: 内置 30 多种丰富的模块和格式。

- title: 功能强大
- icon: 📝
title: 功能强大
details: 在 Quill 基础上扩展了表格、图片、文件上传、@提醒等丰富特性。

- title: 框架无关
- icon: ⚖️
title: 框架无关
details: 可以在 Vue、React、Angular 等多种框架中使用。

- title: 兼容 Quill
- icon: ✏️
title: 兼容 Quill
details: 兼容 Quill API 和生态。
---
Binary file added packages/docs/fluent-editor/public/favicon.ico
Binary file not shown.
14 changes: 14 additions & 0 deletions packages/docs/fluent-editor/public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 147c913

Please sign in to comment.