Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 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
7175322
docs(en): merging all conflicts
docschina-bot May 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
8 changes: 8 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: 'Интеграции редакторов',
=======
text: 'Drawing & Annonations',
=======
text: 'Drawing & Annotations',
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c
link: '/guide/drawing',
},
{
Expand Down Expand Up @@ -114,6 +118,10 @@ const Translations = [
text: 'Ελληνικά',
link: 'https://el.sli.dev{{pathname}}',
},
{
text: '日本語',
link: 'https://ja.sli.dev{{pathname}}',
},
]

const Customizations = [
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
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 @@ Documentation for [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
80 changes: 80 additions & 0 deletions builtin/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,87 @@

> Документация в процессе разработки. А пока, вы можете взглянуть напрямую [в исходный код](https://github.com/slidevjs/slidev/blob/main/packages/client/builtin).

<<<<<<< HEAD
## Кастомные компоненты
=======
### `Toc`

Insert a Table Of Content.

If you want a slide to not appear in the `<Toc>` component, you can use in the front matter block of the slide:
```yml
---
hideInToc: true
---
```

Titles are displayed using the [`<Titles>` component](#titles)

#### Usage

~~~md
<Toc />
~~~

Parameters:

* `columns` (`string | number`, default: `1`): The number of columns of the display
* `listClass` (`string | string[]`, default: `''`): Classes to apply to the table of contents list
* `maxDepth` (`string | number`, default: `Infinity`): The maximum depth level of title to display
* `minDepth` (`string | number`, default: `1`): The minimum depth level of title to display
* `mode` (`'all' | 'onlyCurrentTree'| 'onlySiblings'`, default: `'all'`):
* `'all'`: Display all items
* `'onlyCurrentTree'`: Display only items that are in current tree (active item, parents and children of active item)
* `'onlySiblings'`: Display only items that are in current tree and their direct siblings

### `Link`

Insert a link you can use to navigate to a given slide.

#### Usage

~~~md
<Link to="42">Go to slide 42</Link>
<Link to="42" title="Go to slide 42"/>
~~~

Parameters:

* `to` (`string | number`): The path of the slide to navigate to (slides starts from `1`)
* `title` (`string`): The title to display

### `Titles`

Insert the main title from a slide parsed as HTML.

Titles and title levels get automatically retrieved from the first title element of each slides.

You can override this automatic behaviour for a slide by using the front matter syntax:
```yml
---
title: Amazing slide title
level: 2
---
```

#### Usage

The `<Titles>` component is a virtual component you can import with:
```js
import Titles from '/@slidev/titles.md'
```

Then you can use it with:
~~~md
<Titles no="42" />
~~~

Parameters:

* `no` (`string | number`): The number of the slide to display the title from (slides starts from `1`)

## Custom Components
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c

Создайте папку `components/` в корне вашего проекта, и просто вставьте в неё ваши кастомные Vue-компоненты, после этого вы сможете использовать их по тому же имени в ваших markdown-файлах!

Expand Down
8 changes: 8 additions & 0 deletions builtin/layouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,23 @@

### `center`

<<<<<<< HEAD
Отображает содержимое в центре экрана.
=======
Displays the content in the middle of the screen.
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c

### `cover`

Используется для отображения титульной страницы презентации, может содержать название презентации, контекстуализацию и т.д.

### `default`

<<<<<<< HEAD
Самый простой макет для отображения любого вида контента.
=======
The most basic layout, to display any kind of content.
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c

### `end`

Expand Down
2 changes: 1 addition & 1 deletion custom/fonts.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ fonts:
```yaml
---
fonts:
provide: 'none'
provider: 'none'
---
```

Expand Down
37 changes: 37 additions & 0 deletions custom/global-layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,25 @@

Глобальные слои позволяют иметь кастомные компоненты, **постоянно** доступные в слайдах. Это может быть полезно для футера, анимации смены слайдов, глобальных эффектов и т.д.

<<<<<<< HEAD
Slidev предоставляет два слоя для этого: создайте `global-top.vue` или `global-bottom.vue` в корне вашего проекта, и он будет загружен автоматически.
=======
Slidev provides three layers for this usage, create `global-top.vue`, `global-bottom.vue` or `custom-nav-controls.vue` under your project root and it will pick up automatically.
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c

Связь слоёв:

<<<<<<< HEAD
- Глобальный Top (`global-top.vue`)
- Слайды
- Глобальный Bottom (`global-bottom.vue`)
=======
- Global Top (`global-top.vue`)
- Slides
- Global Bottom (`global-bottom.vue`)
- NavControls
- Customized Navigation Controls (`custom-nav-controls.vue`)
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c

## Примеры

Expand All @@ -23,7 +35,22 @@ Slidev предоставляет два слоя для этого: созда

Текст `Ваше имя` будет отображаться на всех ваших слайдах.

<<<<<<< HEAD
Чтобы использовать при определённых условиях, вы можете применить его с помощью [глобального контекста Vue](/custom/vue-context).
=======
```html
<!-- custom-nav-controls -->
<template>
<button class="icon-btn" title="Next" @click="$slidev.nav.next">
<carbon:arrow-right />
</button>
</template>
```

The button `Next` will appear in NavControls.

To enable it conditionally, you can apply it with the [Vue Global Context](/custom/vue-context).
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c

```html
<!-- футер будет скрыт на четвёртой странице -->
Expand Down Expand Up @@ -60,3 +87,13 @@ Slidev предоставляет два слоя для этого: созда
</footer>
</template>
```

```html
<!-- custom-nav-controls -->
<!-- hide the button in Presenter model -->
<template>
<button v-if="!$slidev.nav.isPresenter" class="icon-btn" title="Next" @click="$slidev.nav.next">
<carbon:arrow-right />
</button>
</template>
```
4 changes: 2 additions & 2 deletions custom/highlighters.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ import { defineShikiSetup } from '@slidev/types'
export default defineShikiSetup(async({ loadTheme }) => {
return {
theme: {
dark: await loadTheme('path/to/theme.json')),
light: await loadTheme('path/to/theme.json')),
dark: await loadTheme('path/to/theme.json'),
light: await loadTheme('path/to/theme.json'),
},
}
})
Expand Down
57 changes: 57 additions & 0 deletions custom/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,80 @@ Slidev полностью кастомизируем, начиная от сти

```yaml
---
<<<<<<< HEAD
# id темы или название пакета
theme: 'default'
# заголовок слайда, если не указан, то будет автоматически подставлен из первого найденного заголовка
title: ''
# шаблон заголовка для веб-страницы, `%s` будет заменен заголовком страницы
=======
# theme id or package name
# Learn more: https://sli.dev/themes/use.html
theme: 'default'
# title of your slide, will auto infer from the first header if not specified
title: 'Slidev'
# titleTemplate for the webpage, `%s` will be replaced by the page's title
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c
titleTemplate: '%s - Slidev'
# information for your slides, can be a markdown string
info: false

<<<<<<< HEAD
# загрузка pdf в SPA сборке, также может содержать кастомный URL
download: true
# подсветка синтаксиса, может быть 'prism' или 'shiki'
=======
# enabled pdf downloading in SPA build, can also be a custom url
download: false
# filename of the export file
exportFilename: 'slidev-exported.pdf'
# syntax highlighter, can be 'prism' or 'shiki'
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c
highlighter: 'prism'
# отображение номеров строк в блоках кода
lineNumbers: false
<<<<<<< HEAD
# включение Monaco редактора, по умолчанию только в дев режиме
=======
# enable monaco editor, can be boolean, 'dev' or 'build'
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c
monaco: 'dev'
# download remote assets in local using vite-plugin-remote-assets, can be boolean, 'dev' or 'build'
remoteAssets: false
# controls whether texts in slides are selectable
selectable: true
# enable slide recording, can be boolean, 'dev' or 'build'
record: 'dev'

<<<<<<< HEAD
# цветовая схема для слайдов, может быть 'auto', 'light', или 'dark'
colorSchema: 'auto'
# режим роутера для vue-router, может быть 'history' или 'hash'
=======
# force color schema for the slides, can be 'auto', 'light', or 'dark'
colorSchema: 'auto'
# router mode for vue-router, can be "history" or "hash"
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c
routerMode: 'history'
# соотношение сторон слайдов
aspectRatio: '16/9'
# реальная ширина canvas, единица измерения в пикселях
canvasWidth: 980
# used for theme customization, will inject root styles as `--slidev-theme-x` for attribute `x`
themeConfig:
primary: '#5d8392'

<<<<<<< HEAD
# шрифты будут автоматически импортированы из Google fonts
# Подробнее: https://sli.dev/custom/fonts
=======
# favicon, can be a local file path or URL
favicon: 'https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png'
# URL of PlantUML server used to render diagrams
plantUmlServer: 'https://www.plantuml.com/plantuml'
# fonts will be auto imported from Google fonts
# Learn more: https://sli.dev/custom/fonts
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c
fonts:
sans: 'Roboto'
serif: 'Roboto Slab'
Expand All @@ -45,10 +92,20 @@ defaults:
layout: 'default'
# ...

<<<<<<< HEAD
# информация для слайдов, может быть markdown-строкой
info: |
## Slidev
My first [Slidev](http://sli.dev/) presentations!
=======
# drawing options
# Learn more: https://sli.dev/guide/drawing.html
drawings:
enabled: true
persist: false
presenterOnly: false
syncAll: true
>>>>>>> afa4515b72ea8814d0a633bdb4ec4c41734b502c
---
```

Expand Down
Loading