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-ru/main @ a9706e02 #60

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 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
af30fcf
chore: update deps
antfu Jun 30, 2022
6cf71f5
fix: update links
antfu Jun 30, 2022
eca0155
fix: remove work in progress note
antfu Jun 30, 2022
8b430ee
chore: upgrade vitepress
antfu Jul 12, 2022
8c6068a
docs: added description and example usage for auto scroll feature (#83)
wolodev Jul 21, 2022
ea87df4
docs: add previews of slidev-theme-eloc (#85)
zthxxx Jul 27, 2022
e385300
fix: dark mode switch (#86)
leonardssh Jul 31, 2022
1798f9b
Update hosting.md (#88)
pagobls Aug 12, 2022
e9156da
docs: fix exportFilename (#89)
YazanShannak Aug 12, 2022
2b46447
feat: migration message and examples for the new setupShortcuts (#90)
twitwi Sep 12, 2022
f3e4a95
docs: update global-layers.md (#93)
godkun Sep 21, 2022
a9706e0
docs: fix typos and tweak grammar (#94)
Oct 5, 2022
5f192be
docs(en): merging all conflicts
docschina-bot Oct 5, 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
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
shamefully-hoist=true
strict-peer-dependencies=false
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: 'Интеграции редакторов',
=======
text: 'Drawing & Annonations',
=======
text: 'Drawing & Annotations',
>>>>>>> a9706e023e005538c02c8ba9f36d03876f65dacb
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: 'Русский',
Expand Down Expand Up @@ -114,6 +129,10 @@ const Translations = [
text: 'Ελληνικά',
link: 'https://el.sli.dev{{pathname}}',
},
{
text: '日本語',
link: 'https://ja.sli.dev{{pathname}}',
},
]

const Customizations = [
Expand Down Expand Up @@ -196,7 +215,15 @@ const slidebars = [
children: Theme,
},
{
<<<<<<< HEAD
text: 'Кастомизация',
=======
text: 'Addons',
children: Addon,
},
{
text: 'Customizations',
>>>>>>> a9706e023e005538c02c8ba9f36d03876f65dacb
children: Customizations,
},
{
Expand Down Expand Up @@ -259,7 +286,15 @@ module.exports = {
items: Theme,
},
{
<<<<<<< HEAD
text: 'Кастомизация',
=======
text: 'Addon',
items: Addon,
},
{
text: 'Customize',
>>>>>>> a9706e023e005538c02c8ba9f36d03876f65dacb
items: Customizations,
},
{
Expand All @@ -275,6 +310,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
15 changes: 6 additions & 9 deletions .vitepress/theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,17 @@

<!-- <Debug /> -->

<ClientOnly>
<!-- <ClientOnly>
<WorkingInProgress />
</ClientOnly>
</ClientOnly> -->
</template>

<script setup lang="ts">
import { ref, computed, watch, defineAsyncComponent } from 'vue'
import {
useRoute,
useSiteData,
useSiteDataByRoute,
useData,
} from 'vitepress'
import type { DefaultTheme } from './config'

// components
import NavBar from './components/NavBar.vue'
Expand All @@ -72,8 +70,7 @@ const Home = defineAsyncComponent(() => import('./components/Home.vue'))

// generic state
const route = useRoute()
const siteData = useSiteData<DefaultTheme.Config>()
const siteRouteData = useSiteDataByRoute()
const {site: siteData} = useData()
const theme = computed(() => siteData.value.themeConfig)

const AlgoliaSearchBox = defineAsyncComponent(
Expand All @@ -87,7 +84,7 @@ const enableHome = computed(() => !!route.data.frontmatter.home)

// navbar
const showNavbar = computed(() => {
const { themeConfig } = siteRouteData.value
const { themeConfig } = siteData.value
const { frontmatter } = route.data
if (frontmatter.navbar === false || themeConfig.navbar === false)
return false
Expand All @@ -107,7 +104,7 @@ const openSideBar = ref(false)

const showSidebar = computed(() => {
const { frontmatter } = route.data
const { themeConfig } = siteRouteData.value
const { themeConfig } = siteData.value
return (
!frontmatter.home
&& frontmatter.sidebar !== false
Expand Down
5 changes: 4 additions & 1 deletion .vitepress/theme/NotFound.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
<div class="theme">
<h1>404</h1>
<blockquote>{{ getMsg() }}</blockquote>
<a :href="$site.base" aria-label="go to home">Take me home.</a>
<a :href="site.base" aria-label="go to home">Take me home.</a>
</div>
</template>

<script setup lang="ts">
import { useData } from 'vitepress';

const {site} = useData()
const msgs = [
'There\'s nothing here.',
'How did we get here?',
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: 1 addition & 1 deletion .vitepress/theme/components/DarkModeSwitch.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<button aria-label="Toggle Theme" class="nav-btn" @click="toggle">
<button aria-label="Toggle Theme" class="nav-btn" @click="toggle()">
<ri-moon-fill v-show="isDark" />
<ri-sun-fill v-show="!isDark" />
</button>
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
8 changes: 4 additions & 4 deletions .vitepress/theme/components/HomeFeatures.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@

<script setup lang="ts">
import { computed } from 'vue'
import { useFrontmatter } from 'vitepress'
import { useData } from 'vitepress'

const data = useFrontmatter()
const {frontmatter} = useData()

const hasFeatures = computed(() => {
return data.value.features && data.value.features.length > 0
return frontmatter.value.features && frontmatter.value.features.length > 0
})

const features = computed(() => {
return data.value.features ? data.value.features : []
return frontmatter.value.features ? frontmatter.value.features : []
})
</script>

Expand Down
18 changes: 9 additions & 9 deletions .vitepress/theme/components/HomeHero.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

<NavLink
v-if="hasAction"
:item="{ link: data.actionLink, text: data.actionText }"
:item="{ link: frontmatter.actionLink, text: frontmatter.actionText }"
class="action mx-2"
rounded="tr-4xl tl-2xl br-2xl bl-3xl"
/>

<NavLink
v-if="hasAltAction"
:item="{ link: data.altActionLink, text: data.altActionText }"
:item="{ link: frontmatter.altActionLink, text: frontmatter.altActionText }"
class="action alt mx-2"
rounded="tr-2xl tl-3xl br-4xl bl-4xl"
/>
Expand All @@ -51,19 +51,19 @@

<script setup lang="ts">
import { computed } from 'vue'
import { useFrontmatter } from 'vitepress'
import { useData } from 'vitepress'
import NavLink from './NavLink.vue'

const data = useFrontmatter()
const {frontmatter} = useData()

const hasHeroText = computed(() => data.value.heroText !== null)
const hasTagline = computed(() => data.value.tagline !== null)
const hasHeroText = computed(() => frontmatter.value.heroText !== null)
const hasTagline = computed(() => frontmatter.value.tagline !== null)

const hasAction = computed(() => data.value.actionLink && data.value.actionText)
const hasAltAction = computed(() => data.value.altActionLink && data.value.altActionText)
const hasAction = computed(() => frontmatter.value.actionLink && frontmatter.value.actionText)
const hasAltAction = computed(() => frontmatter.value.altActionLink && frontmatter.value.altActionText)

const showHero = computed(() => {
return data.value.heroImage
return frontmatter.value.heroImage
|| hasHeroText.value
|| hasTagline.value
|| hasAction.value
Expand Down
7 changes: 3 additions & 4 deletions .vitepress/theme/components/LastUpdated.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@

<script lang="ts">
import { defineComponent, ref, computed, onMounted } from 'vue'
import { useSiteDataByRoute, usePageData } from 'vitepress'
import { useData } from 'vitepress'

export default defineComponent({
setup() {
const site = useSiteDataByRoute()
const page = usePageData()
const { site, page } = useData()

const datetime = ref('')

Expand All @@ -29,7 +28,7 @@ export default defineComponent({
})

onMounted(() => {
datetime.value = new Date(page.value.lastUpdated).toLocaleString('en-US')
datetime.value = new Date(page.value.lastUpdated || 0).toLocaleString('en-US')
})

return {
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
16 changes: 12 additions & 4 deletions .vitepress/theme/components/NavBarTitle.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
<script setup lang="ts">
import { computed } from '@vue/reactivity';
import { useData ,withBase} from 'vitepress';

const {site} = useData()
const themeConfig = computed(()=>site.value.themeConfig)
</script>

<template>
<a
class="nav-bar-title"
:href="$site.base"
:aria-label="`${$site.title}, back to home`"
:href="site.base"
:aria-label="`${site.title}, back to home`"
>
<img
v-if="$themeConfig.logo"
v-if="themeConfig.logo"
class="logo"
:src="$withBase($themeConfig.logo)"
:src="withBase(themeConfig.logo)"
alt="Logo"
>
<span class="title text-primary-deep">
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
4 changes: 2 additions & 2 deletions .vitepress/theme/components/NavLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

<script setup lang="ts">
import { computed } from 'vue'
import { useSiteDataByRoute } from 'vitepress'
import { useData } from 'vitepress'
import { useLocaleLinks } from '../composables/nav'
import NavLink from './NavLink.vue'
import NavDropdownLink from './NavDropdownLink.vue'

const site = useSiteDataByRoute()
const {site} = useData()
const localeLinks = useLocaleLinks()

const links = computed(() => site.value.themeConfig.nav)
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
Loading