diff --git a/.gitignore b/.gitignore index b186e94..c62e6a4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules dist .vitepress/@slidev +.vitepress/cache diff --git a/.vitepress/config.js b/.vitepress/config.ts similarity index 59% rename from .vitepress/config.js rename to .vitepress/config.ts index 6fcef53..20be457 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.ts @@ -1,6 +1,11 @@ -// @ts-check +import type { DefaultTheme } from 'vitepress' +import { defineConfig } from 'vitepress' +import { transformerTwoslash } from '@shikijs/vitepress-twoslash' +import vite from '../vite.config' -const Guide = [ +const CURRENT_VERSION = '0.47.1' + +const Guide: DefaultTheme.NavItemWithLink[] = [ { text: 'Warum Slidev', link: '/guide/why', @@ -55,7 +60,18 @@ const Guide = [ }, ] -const Theme = [ +const BuiltIn: DefaultTheme.NavItemWithLink[] = [ + { + text: 'Components', + link: '/builtin/components', + }, + { + text: 'Layouts', + link: '/builtin/layouts', + }, +] + +const Theme: (DefaultTheme.NavItemWithLink | DefaultTheme.NavItemChildren)[] = [ { text: 'Theme benutzen', link: '/themes/use', @@ -70,7 +86,7 @@ const Theme = [ }, ] -const Addon = [ +const Addon: DefaultTheme.NavItemWithLink[] = [ { text: 'Addon benutzen', link: '/addons/use', @@ -81,6 +97,7 @@ const Addon = [ }, ] +<<<<<<< HEAD:.vitepress/config.js const Translations = [ { text: 'Deutsch', @@ -128,6 +145,9 @@ const Translations = [ ] const Customizations = [ +======= +const Customizations: (DefaultTheme.NavItemWithLink | DefaultTheme.NavItemChildren)[] = [ +>>>>>>> dbfb0168dc2a10c37d04f991ec135a402b411f02:.vitepress/config.ts { text: 'Individualisierung', link: '/custom/', @@ -153,8 +173,13 @@ const Customizations = [ link: '/custom/config-vite', }, { +<<<<<<< HEAD:.vitepress/config.js text: 'Windi CSS konfigurieren', link: '/custom/config-windicss', +======= + text: 'Configure UnoCSS', + link: '/custom/config-unocss', +>>>>>>> dbfb0168dc2a10c37d04f991ec135a402b411f02:.vitepress/config.ts }, { text: 'Monaco konfigurieren', @@ -183,10 +208,10 @@ const Customizations = [ { text: 'Globale Ebenen', link: '/custom/global-layers', - } + }, ] -const Resources = [ +const Resources: DefaultTheme.NavItemWithLink[] = [ { text: 'Beispielprojekte', link: '/showcases', @@ -201,20 +226,26 @@ const Resources = [ }, ] -const slidebars = [ +const slidebars: DefaultTheme.SidebarItem[] = [ { text: 'Guide', - children: Guide, + items: Guide, }, { +<<<<<<< HEAD:.vitepress/config.js text: 'Themen', children: Theme, +======= + text: 'Themes', + items: Theme, +>>>>>>> dbfb0168dc2a10c37d04f991ec135a402b411f02:.vitepress/config.ts }, { text: 'Addons', - children: Addon, + items: Addon, }, { +<<<<<<< HEAD:.vitepress/config.js text: 'Individualisierung', children: Customizations, }, @@ -230,13 +261,18 @@ const slidebars = [ link: '/builtin/layouts', }, ], +======= + text: 'Customizations', + items: Customizations, + }, + { + text: 'Built-in', + items: BuiltIn, +>>>>>>> dbfb0168dc2a10c37d04f991ec135a402b411f02:.vitepress/config.ts }, ] -/** - * @type {import('vitepress').UserConfig} - */ -module.exports = { +export default defineConfig({ title: 'Slidev', description: 'Präsentationsfolien für Entwickler', head: [ @@ -252,9 +288,27 @@ module.exports = { ['link', { rel: 'preconnect', crossorigin: 'anonymous', href: 'https://fonts.gstatic.com' }], ['link', { href: 'https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@200;400;500&family=Inter:wght@200;400;500;600', rel: 'stylesheet' }], ], + markdown: { + theme: { + light: 'vitesse-light', + dark: 'vitesse-dark', + }, + async shikiSetup(shiki) { + await shiki.loadLanguage( + 'html', + 'xml', + 'vue', + 'markdown', + ) + }, + codeTransformers: [ + transformerTwoslash(), + ], + }, + cleanUrls: true, themeConfig: { - repo: 'slidevjs/docs', logo: '/logo.svg', +<<<<<<< HEAD:.vitepress/config.js docsBranch: 'main', editLinks: true, editLinkText: 'Schlage Verbesserungen an dieser Seite vor', @@ -267,6 +321,15 @@ module.exports = { // for translations maintainers: change the filter to your locale code (subdomain name) facetFilters: ['language:de'] } +======= + editLink: { + pattern: 'https://github.com/slidevjs/docs/edit/main/:path', + text: 'Suggest changes to this page', + }, + + search: { + provider: 'local', +>>>>>>> dbfb0168dc2a10c37d04f991ec135a402b411f02:.vitepress/config.ts }, nav: [ @@ -275,6 +338,7 @@ module.exports = { items: Guide, }, { +<<<<<<< HEAD:.vitepress/config.js text: 'Thema', items: Theme, }, @@ -285,17 +349,50 @@ module.exports = { { text: 'Individualisieren', items: Customizations, +======= + text: 'Theme', + items: [ + ...Theme, + { + text: 'Built-in', + items: BuiltIn, + }, + ], + }, + { + text: 'Customize', + items: [ + ...Customizations, + { + text: 'Addon', + items: Addon, + }, + ], +>>>>>>> dbfb0168dc2a10c37d04f991ec135a402b411f02:.vitepress/config.ts }, { text: 'Ressourcen', items: Resources, }, { +<<<<<<< HEAD:.vitepress/config.js text: 'Deutsch', items: Translations, +======= + text: `v${CURRENT_VERSION}`, + items: [ + { text: 'Release Notes', link: 'https://github.com/slidevjs/slidev/releases' }, + ], +>>>>>>> dbfb0168dc2a10c37d04f991ec135a402b411f02:.vitepress/config.ts }, ], + socialLinks: [ + { icon: 'github', link: 'https://github.com/slidevjs/slidev' }, + { icon: 'twitter', link: 'https://twitter.com/slidevjs' }, + { icon: 'discord', link: 'https://chat.sli.dev' }, + ], + sidebar: { '/guide/': slidebars, '/themes/': slidebars, @@ -305,5 +402,52 @@ module.exports = { '/resources/': slidebars, '/': slidebars, }, + + footer: { + message: 'Released under the MIT License.', + copyright: 'Copyright © 2020 Anthony Fu.', + }, + }, + + locales: { + root: { + label: 'English', + }, + zh: { + label: '简体中文', + link: 'https://cn.sli.dev/', + }, + fr: { + label: 'Français', + link: 'https://fr.sli.dev/', + }, + es: { + label: 'Español', + link: 'https://es.sli.dev/', + }, + ru: { + label: 'Русский', + link: 'https://ru.sli.dev/', + }, + vn: { + label: 'Việt Nam', + link: 'https://vn.sli.dev/', + }, + de: { + label: 'Deutsch', + link: 'https://de.sli.dev/', + }, + br: { + label: 'Português (BR)', + link: 'https://br.sli.dev/', + }, + el: { + label: 'Ελληνικά', + link: 'https://el.sli.dev/', + }, + ja: { + label: '日本語', + link: 'https://ja.sli.dev/', + }, }, -} +}) diff --git a/.vitepress/scripts/prepare.js b/.vitepress/scripts/prepare.js index c0e13b3..661b2a1 100644 --- a/.vitepress/scripts/prepare.js +++ b/.vitepress/scripts/prepare.js @@ -1,8 +1,8 @@ -const fs = require('fs-extra') +import { copy, remove } from 'fs-extra' -async function main(){ - await fs.remove('.vitepress/@slidev') - await fs.copy('node_modules/@slidev', '.vitepress/@slidev', { dereference: true }) +async function main() { + await remove('.vitepress/@slidev') + await copy('node_modules/@slidev', '.vitepress/@slidev', { dereference: true }) } main() diff --git a/.vitepress/showcases.ts b/.vitepress/showcases.ts index 239742f..a80eea2 100644 --- a/.vitepress/showcases.ts +++ b/.vitepress/showcases.ts @@ -115,7 +115,7 @@ export const showcases: ShowCaseInfo[] = [ name: 'Alexander Eble', link: 'https://github.com/alexanderdavide', }, - slidesLink: 'https://git-most-wanted.alex-eble.de', + slidesLink: 'https://alexeble.de/talks/git-most-wanted/', sourceLink: 'https://github.com/alexanderdavide/git-most-wanted', at: 'Internal Tech Talk', datetime: '2022-03-11', @@ -132,7 +132,7 @@ export const showcases: ShowCaseInfo[] = [ at: 'OpenFunction Tutorial Sharing', datetime: '2022-05-08', }, - { + { title: 'Is it Okay to Pursue Functional Programming on Frontend?', author: { name: 'Minsu Kim , Changhui Lee', @@ -166,6 +166,30 @@ export const showcases: ShowCaseInfo[] = [ cover: 'https://raw.githubusercontent.com/Mokkapps/vuejsnation-2023-lightning-talk-polite-popup-nuxt-3-slides/main/screenshots/001.png', datetime: '2023-01-25', }, + { + title: 'Dev Environment as Code', + cover: 'https://cdn.jsdelivr.net/gh/alexanderdavide/dev-environment-as-code@assets/slides-export/001.png', + author: { + name: 'Alexander Eble', + link: 'https://github.com/alexanderdavide', + }, + slidesLink: 'https://alexeble.de/talks/dev-environment-as-code/', + sourceLink: 'https://github.com/alexanderdavide/dev-environment-as-code', + at: 'Internal Tech Talk', + datetime: '2022-12-01', + }, + { + title: 'Exploring Social Engineering', + cover: 'https://raw.githubusercontent.com/zyf722/exploring-social-engineering-slides/main/assets/Screenshot_Cover.png', + author: { + name: 'zyf722', + link: 'https://github.com/zyf722', + }, + slidesLink: 'https://zyf722.github.io/exploring-social-engineering-slides/', + sourceLink: 'https://github.com/zyf722/exploring-social-engineering-slides', + at: 'Presentation on Social Engineering in Computers in Society class', + datetime: '2023-10-20', + }, // Add yours here! { title: 'Yours?', diff --git a/.vitepress/theme/Layout.vue b/.vitepress/theme/Layout.vue deleted file mode 100644 index b8341f9..0000000 --- a/.vitepress/theme/Layout.vue +++ /dev/null @@ -1,137 +0,0 @@ - - - diff --git a/.vitepress/theme/components/AlgoliaSearchBox.vue b/.vitepress/theme/components/AlgoliaSearchBox.vue deleted file mode 100644 index 9561cb3..0000000 --- a/.vitepress/theme/components/AlgoliaSearchBox.vue +++ /dev/null @@ -1,123 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/BooleanDisplay.vue b/.vitepress/theme/components/BooleanDisplay.vue deleted file mode 100644 index 3a876f2..0000000 --- a/.vitepress/theme/components/BooleanDisplay.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - diff --git a/.vitepress/theme/components/DarkModeSwitch.vue b/.vitepress/theme/components/DarkModeSwitch.vue deleted file mode 100644 index adeae06..0000000 --- a/.vitepress/theme/components/DarkModeSwitch.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - diff --git a/.vitepress/theme/components/demo/Demo.vue b/.vitepress/theme/components/Demo.vue similarity index 87% rename from .vitepress/theme/components/demo/Demo.vue rename to .vitepress/theme/components/Demo.vue index 77b8c07..17fc10c 100644 --- a/.vitepress/theme/components/demo/Demo.vue +++ b/.vitepress/theme/components/Demo.vue @@ -1,18 +1,23 @@ diff --git a/.vitepress/theme/components/demo/DemoEditor.vue b/.vitepress/theme/components/DemoEditor.vue similarity index 75% rename from .vitepress/theme/components/demo/DemoEditor.vue rename to .vitepress/theme/components/DemoEditor.vue index 0d685f6..51e8aee 100644 --- a/.vitepress/theme/components/demo/DemoEditor.vue +++ b/.vitepress/theme/components/DemoEditor.vue @@ -1,11 +1,11 @@ - diff --git a/.vitepress/theme/components/EditLink.vue b/.vitepress/theme/components/EditLink.vue deleted file mode 100644 index 7504e01..0000000 --- a/.vitepress/theme/components/EditLink.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/Environment.vue b/.vitepress/theme/components/Environment.vue index 6372b38..b2bf86b 100644 --- a/.vitepress/theme/components/Environment.vue +++ b/.vitepress/theme/components/Environment.vue @@ -3,13 +3,20 @@ defineProps<{ type: 'node' | 'client' }>()