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(en): merge docs/main into docs-vn/main @ c8121c16 #48

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
152e0f6
docs: typo in sidebar (#43)
mathieutu Nov 15, 2021
ad008f0
docs: typos in code (#45)
posva Nov 17, 2021
5d92892
docs: typo (#44)
posva Nov 17, 2021
c393c03
chore: typo (#46)
cheesi Dec 3, 2021
fbc97d8
docs: fix typo (#47)
Deckluhm Dec 8, 2021
a261c23
chore: typo (#48)
tkgroot Dec 20, 2021
06ae275
feat: add TOC documentation (#49)
tonai Jan 17, 2022
ce73d58
fix: broken links (#50)
chengpeiquan Jan 18, 2022
4890d42
Minor notation change (#51)
p1atdev Feb 6, 2022
d99ebc3
feat: add ja trans
antfu Feb 7, 2022
e89a81b
docs: add favicon frontmatter configure (#53)
alexanderdavide Feb 14, 2022
871a293
docs: update shiki URL (#54)
ashramwen Feb 16, 2022
5b4af78
Add slidev-theme-academic (#55)
alexanderdavide Mar 7, 2022
61b06f2
Add showcase Git's Most Wanted (#56)
alexanderdavide Mar 7, 2022
e9cccdb
feat: update install.md to fix the missed docker part (#57)
tangramor Mar 16, 2022
1abac97
Update install.md to fix typos about docker section (#58)
tangramor Mar 16, 2022
b18d6f4
docs: add custom-nav-controls documents (#60)
LarchLiu Mar 22, 2022
d68398a
docs: add mention to --dark option when exporting (#61)
ruyadorno Mar 25, 2022
9fa6829
fix: correct typo in the name of the generated pdf (#62)
twitwi Apr 13, 2022
7308799
Document parameter listClass of Toc (#63)
alexanderdavide Apr 14, 2022
0daa359
feat: add doc for Titles and Link components (#64)
tonai Apr 14, 2022
37797ff
feat: update config doc (#65)
tonai Apr 15, 2022
0305762
docs: update previews of slidev-theme-academic (#66)
alexanderdavide Apr 25, 2022
87e46ef
feat: add doc for CLI commands (#67)
tonai May 19, 2022
017f644
doc: propose a new showcase (#68)
webup May 22, 2022
afa4515
docs: typo with NavControls action description (#69)
lirantal May 24, 2022
1821696
feat: addons doc (#71)
tonai May 25, 2022
1f593ab
docs: fix typos in addons/ (#72)
GeopJr May 27, 2022
2f3c88e
docs: markdown code highlighting for none of the lines (#73)
lirantal Jun 9, 2022
448d7d1
docs: update reference to unplugin-icons (#74)
D3SOX Jun 14, 2022
0d7183d
docs: change some references from http to https (#75)
D3SOX Jun 14, 2022
55faf79
Update navigation.md wording (#77)
CodyBontecou Jun 15, 2022
893d0b6
docs: update custom keybindings (#78)
lirantal Jun 18, 2022
c8121c1
docs: align comments (#80)
yjl9903 Jun 24, 2022
608852a
docs(en): merging all conflicts
docschina-bot Jun 24, 2022
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
36 changes: 36 additions & 0 deletions .vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,14 @@ const Guide = [
link: '/guide/presenter-mode',
},
{
<<<<<<< HEAD
<<<<<<< HEAD
text: 'Tích hợp trình soạn thảo',
=======
text: 'Drawing & Annonations',
=======
text: 'Drawing & Annotations',
>>>>>>> c8121c161efd5a726d336648d2b101540c346dd2
link: '/guide/drawing',
},
{
Expand Down Expand Up @@ -78,6 +82,17 @@ const Theme = [
},
]

const Addon = [
{
text: 'Use Addon',
link: '/addons/use',
},
{
text: 'Write an Addon',
link: '/addons/write-an-addon',
},
]

const Translations = [
{
text: 'Việt Nam'
Expand Down Expand Up @@ -118,6 +133,10 @@ const Translations = [
text: 'Ελληνικά',
link: 'https://el.sli.dev{{pathname}}',
},
{
text: '日本語',
link: 'https://ja.sli.dev{{pathname}}',
},
]

const Customizations = [
Expand Down Expand Up @@ -204,7 +223,15 @@ const slidebars = [
children: Theme,
},
{
<<<<<<< HEAD
text: 'Các tùy chỉnh',
=======
text: 'Addons',
children: Addon,
},
{
text: 'Customizations',
>>>>>>> c8121c161efd5a726d336648d2b101540c346dd2
children: Customizations,
},
{
Expand Down Expand Up @@ -267,7 +294,15 @@ module.exports = {
items: Theme,
},
{
<<<<<<< HEAD
text: 'Tùy chỉnh',
=======
text: 'Addon',
items: Addon,
},
{
text: 'Customize',
>>>>>>> c8121c161efd5a726d336648d2b101540c346dd2
items: Customizations,
},
{
Expand All @@ -283,6 +318,7 @@ module.exports = {
sidebar: {
'/guide/': slidebars,
'/themes/': slidebars,
'/addons/': slidebars,
'/custom/': slidebars,
'/builtin/': slidebars,
'/resources/': slidebars,
Expand Down
24 changes: 24 additions & 0 deletions .vitepress/showcases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,30 @@ export const showcases: ShowCaseInfo[] = [
at: 'Thoughtworks Internal Lunch & Learn',
datetime: '2021-11-12',
},
{
title: 'Git\'s Most Wanted',
cover: 'https://cdn.jsdelivr.net/gh/alexanderdavide/git-most-wanted@assets/slides-export/01.png',
author: {
name: 'Alexander Eble',
link: 'https://github.com/alexanderdavide',
},
slidesLink: 'https://git-most-wanted.alex-eble.de',
sourceLink: 'https://github.com/alexanderdavide/git-most-wanted',
at: 'Internal Tech Talk',
datetime: '2022-03-11',
},
{
title: 'OpenFunction 202',
cover: 'https://s2.loli.net/2022/05/22/4zsCnkQRFoAU1E5.png',
author: {
name: 'Haili Zhang',
link: 'https://github.com/webup',
},
slidesLink: 'https://openfunction-talks.netlify.app/2022/202-node-async/',
sourceLink: 'https://github.com/webup/openfunction-talks/tree/main/202-node-async',
at: 'OpenFunction Tutorial Sharing',
datetime: '2022-05-08',
},
// Add yours here!
{
title: 'Yours?',
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/AlgoliaSearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<script setup lang="ts">
import '@docsearch/css'
import { useRoute, useRouter } from 'vitepress'
import { defineProps, getCurrentInstance, onMounted, watch } from 'vue'
import { getCurrentInstance, onMounted, watch } from 'vue'
import docsearch from '@docsearch/js'
import type { DocSearchHit } from '@docsearch/react/dist/esm/types'
import type { DefaultTheme } from '../config'
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/BooleanDisplay.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, defineProps } from 'vue'
import { ref } from 'vue'

const props = defineProps({
value: {
Expand Down
2 changes: 0 additions & 2 deletions .vitepress/theme/components/Environment.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
import { defineProps } from 'vue'

defineProps<{ type: 'node' | 'client' }>()
</script>

Expand Down
3 changes: 1 addition & 2 deletions .vitepress/theme/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
</template>

<script setup lang="ts">
import { defineEmit, defineProps } from 'vue'
import { useRepo } from '../composables/repo'
import NavBarTitle from './NavBarTitle.vue'
import NavLinks from './NavLinks.vue'
Expand All @@ -48,7 +47,7 @@ import DarkModeSwitch from './DarkModeSwitch.vue'

const repo = useRepo()

defineEmit(['toggle'])
defineEmits(['toggle'])

defineProps({
showSidebar: { type: Boolean, required: true },
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/NavDropdownLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</template>

<script setup lang="ts">
import { defineProps, ref, watch } from 'vue'
import { ref, watch } from 'vue'
import { useRoute } from 'vitepress'
import type { DefaultTheme } from '../config'
import NavDropdownLinkItem from './NavDropdownLinkItem.vue'
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/NavDropdownLinkItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</template>

<script setup lang="ts">
import { defineProps, toRefs } from 'vue'
import { toRefs } from 'vue'
import type { DefaultTheme } from '../config'
import { useNavLink } from '../composables/navLink'
import OutboundLink from './icons/OutboundLink.vue'
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/NavLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</template>

<script setup lang="ts">
import { defineProps, toRefs } from 'vue'
import { toRefs } from 'vue'
import type { DefaultTheme } from '../config'
import { useNavLink } from '../composables/navLink'
import OutboundLink from './icons/OutboundLink.vue'
Expand Down
1 change: 0 additions & 1 deletion .vitepress/theme/components/ShowCaseInfo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup lang="ts">
import { defineProps } from 'vue'
import type { ShowCaseInfo } from '../../showcases'

defineProps<{
Expand Down
1 change: 0 additions & 1 deletion .vitepress/theme/components/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</template>

<script setup lang="ts">
import { defineProps } from 'vue'
import NavLinks from './NavLinks.vue'
import SideBarLinks from './SideBarLinks.vue'

Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/ThemeGallery.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { defineProps, computed } from 'vue'
import { computed } from 'vue'
import { official, community } from '../../themes'

const props = defineProps({
Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/ThemeInfo.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { defineProps, ref } from 'vue'
import { ref } from 'vue'
import { isClient, useIntervalFn } from '@vueuse/core'
import type { ThemeInfo } from '../../themes'

Expand Down
2 changes: 1 addition & 1 deletion .vitepress/theme/components/Tweet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Usage:

<script setup lang="ts">
import { useScriptTag, isClient } from '@vueuse/core'
import { defineProps, getCurrentInstance, onMounted, ref } from 'vue'
import { getCurrentInstance, onMounted, ref } from 'vue'
import { isDark } from '../composables/dark'

const props = defineProps<{
Expand Down
23 changes: 23 additions & 0 deletions .vitepress/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,29 @@ export const community: ThemeInfo[] = [
'light',
],
},
{
id: 'slidev-theme-academic',
name: 'Academic',
description: 'Academic presentations with Slidev made simple',
author: {
name: 'Alexander Eble',
link: 'https://github.com/alexanderdavide',
},
repo: 'https://github.com/alexanderdavide/slidev-theme-academic',
previews: [
'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/01.png',
'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/02.png',
'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/08.png',
'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/04.png',
'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/05.png',
'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/06.png',
'https://cdn.jsdelivr.net/gh/alexanderdavide/slidev-theme-academic@assets/example-export/07.png',
],
tags: [
'dark',
'light',
],
},
// Add yours here!
{
id: '',
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Tài liệu cho [Slidev](https://github.com/slidevjs/slidev)
| Deutsch | [docs-de](https://github.com/slidevjs/docs-de) | [de.sli.dev](https://de.sli.dev) | [@fabiankachlock](https://github.com/fabiankachlock) |
| Português (BR) | [docs-br](https://github.com/slidevjs/docs-br) | [br.sli.dev](https://br.sli.dev) | [@luisfelipesdn12](https://github.com/luisfelipesdn12) |
| Ελληνικά | [docs-el](https://github.com/slidevjs/docs-el) | [el.sli.dev](https://el.sli.dev) | [@GeopJr](https://github.com/GeopJr) |
| 日本語 | [docs-ja](https://github.com/slidevjs/docs-el) | [ja.sli.dev](https://ja.sli.dev) | [@IkumaTadokoro](https://github.com/IkumaTadokoro) |

## Start Server Locally

Expand Down
5 changes: 5 additions & 0 deletions TRANSLATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ In case it's already been translated but you're wondering how to maintain it, sk
- [ ] `use.md` - How to use Slidev themes
- [ ] `write-a-theme.md` - Write your own theme

### addons/

- [ ] `use.md` - How to use Slidev addons
- [ ] `write-an-addon.md` - Write your own addon

## Publishing your translations

- [ ] When you finish the translation (at least 90%), `@antfu` in the Discord and we will invite you to the org and make the translation official.
Expand Down
38 changes: 38 additions & 0 deletions addons/use.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Use Addon

Addons are sets of additional components, layouts, styles, configuration...etc. that you can use in your presentation.

They are quite similar to [themes](/themes/use), but in general:

* they don't affect the global styles of your slides
* you can use multiple addons in one presentation

To use addons, you have to install them manually via:

```bash
$ npm install [slidev-addon-package1] [slidev-addon-package2]
```

And then declare the addons either in your frontmatter:

```yaml
---
addons:
- slidev-addon-package1
- slidev-addon-package2
---
```

Or in your `package.json` file:

```json
// package.json
{
"slidev": {
"addons": [
"slidev-addon-package1",
"slidev-addon-package2",
]
}
}
```
71 changes: 71 additions & 0 deletions addons/write-an-addon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Write an Addon

> Available since v0.32.1

## Capability

An addon can contribute to the following points:

- Global styles (use with caution has it is more the role of [themes](/themes/use))
- Provide custom layouts or override the existing one
- Provide custom components or override the existing one
- Extend Windi CSS configurations
- Configure tools like Monaco and Prism

## Conventions

Addons are published to npm registry, and they should follow the conventions below:

- Package name should start with `slidev-addon-`, for example: `slidev-addon-awesome`
- Add `slidev-addon` and `slidev` in the `keywords` field of your `package.json`

## Setup

### Initialization

To create your addon, start by creating a directory with create a `package.json` file (you can use `npm init`).

Then, install slidev dependencies:

```bash
$ npm install -D @slidev/cli
```

### Testing

To set up the testing playground for your addon, you can create an `example.md` file with some content.

And optionally, you can also add some scripts to your `packages.json`

```json
// package.json
{
"scripts": {
"dev": "slidev example.md",
"build": "slidev build example.md",
"export": "slidev export example.md",
"screenshot": "slidev export example.md --format png"
}
}
```

To publish your addon, simply run `npm publish` and you are good to go. There is no build process required (which means you can directly publish `.vue` and `.ts` files, Slidev is smart enough to understand them).

Addon contribution points follow the same conventions as local customization, please refer to [the docs for the naming conventions](/custom/).

## Addon metadata

### Slidev Version

If the addon is relying on a specific feature of Slidev that are newly introduced, you can set the minimal Slidev version required to have your addon working properly:

```json
// package.json
{
"engines": {
"slidev": ">=0.32.1"
}
}
```

If users are using older versions of Slidev, an error will be thrown.
Loading