diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 3db55b1..0000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,4 +0,0 @@ -contact_links: - - name: Main Repository - url: https://github.com/slidevjs/slidev/ - about: This translation is out of date, This translation is outdated, please do not file an issue here. diff --git a/.gitignore b/.gitignore index 3ebecbc..fda84bf 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ node_modules dist .vitepress/@slidev -.idea +.vitepress/cache \ No newline at end of file diff --git a/.npmrc b/.npmrc deleted file mode 100755 index cf04042..0000000 --- a/.npmrc +++ /dev/null @@ -1,2 +0,0 @@ -shamefully-hoist=true -strict-peer-dependencies=false diff --git a/.vitepress/addons.ts b/.vitepress/addons.ts new file mode 100644 index 0000000..ff3483c --- /dev/null +++ b/.vitepress/addons.ts @@ -0,0 +1,291 @@ +import type { ThemeInfo } from './themes' + +export type AddonInfo = Omit + +export const official: AddonInfo[] = [ + { + id: '', + link: '#', + name: 'Work in Progress', + description: '', + tags: [], + author: { + name: '', + }, + }, +] + +// Please add your addon to the end of the list. +export const community: AddonInfo[] = [ + { + id: 'slidev-addon-python-runner', + name: 'Python Runner', + description: 'Exécuter du code Python réel dans vos diapositives', + tags: ['Code runner'], + author: { + name: '_Kerman', + link: 'https://github.com/KermanX', + }, + repo: 'https://github.com/KermanX/slidev-addon-python-runner', + }, + { + id: 'slidev-addon-tldraw', + name: 'tldraw', + description: 'Intégrer des diagrammes tldraw directement dans Slidev, avec support d\'édition dans la diapositive', + tags: ['Integration', 'Diagram'], + author: { + name: 'Albert Brand', + link: 'https://github.com/AlbertBrand', + }, + repo: 'https://github.com/AlbertBrand/slidev-addon-tldraw', + }, + { + id: 'slidev-addon-react', + name: 'React Components', + description: 'Utiliser des composants React avec JSX/TSX dans vos présentations Slidev.', + tags: ['React', 'Component', 'Integration'], + repo: 'https://github.com/Ygilany/slidev-addon-react', + author: { + name: 'YGilany', + link: 'https://github.com/YGilany', + }, + }, + { + id: 'slidev-addon-typst', + name: 'Typst', + description: 'Addon Typst pour Slidev', + tags: ['Integration', 'Diagram'], + author: { + name: 'Shigma', + link: 'https://github.com/shigma', + }, + repo: 'https://github.com/shigma/slidev-addon-typst', + }, + { + id: 'slidev-addon-fancy-arrow', + name: 'Fancy Arrow', + description: 'Flèches dessinées à la main avec diverses options de style et de positionnement', + tags: ['Component'], + author: { + name: 'whitphx', + link: 'https://github.com/whitphx', + }, + repo: 'https://github.com/whitphx/slidev-addon-fancy-arrow', + }, + { + id: 'slidev-addon-sync', + name: 'Remote Sync', + description: 'Composant de synchronisation pour la construction statique Slidev utilisant un serveur SSE ou WS', + tags: ['Remote control', 'Navigation'], + author: { + name: 'Tony Cabaye', + link: 'https://github.com/tonai', + }, + repo: 'https://github.com/Smile-SA/slidev-addon-sync', + }, + { + id: 'slidev-addon-tikzjax', + name: 'tikzjax', + description: 'Compiler TikZ/Chemfig/... en SVG et les afficher dans Slidev', + tags: ['Integration', 'Diagram'], + author: { + name: 'Ethan Goh', + link: 'https://github.com/7086cmd', + }, + repo: 'https://github.com/7086cmd/slidev-addon-tikzjax', + }, + { + id: 'slidev-component-pager', + name: 'Pager', + description: 'Afficher la page actuelle et le nombre total de pages', + tags: ['Component', 'Navigation'], + author: { + name: 'Tony Cabaye', + link: 'https://github.com/tonai', + }, + repo: 'https://github.com/Smile-SA/slidev-component-pager', + }, + { + id: 'slidev-component-poll', + name: 'Poll and Quiz', + description: 'Composants de sondage et quiz pour Slidev', + tags: ['Component'], + author: { + name: 'Tony Cabaye', + link: 'https://github.com/tonai', + }, + repo: 'https://github.com/Smile-SA/slidev-component-poll', + }, + { + id: 'slidev-component-progress', + name: 'Progress', + description: 'Afficher une barre de progression interactive pour Slidev', + tags: ['Tool', 'Navigation'], + author: { + name: 'Tony Cabaye', + link: 'https://github.com/tonai', + }, + repo: 'https://github.com/Smile-SA/slidev-component-progress', + }, + { + id: 'slidev-component-scroll', + name: 'Mouse Scroll', + description: 'Utiliser la molette de la souris pour naviguer', + tags: ['Navigation'], + author: { + name: 'Tony Cabaye', + link: 'https://github.com/tonai', + }, + repo: 'https://github.com/Smile-SA/slidev-component-scroll', + }, + { + id: 'slidev-component-spotlight', + name: 'Spotlight', + description: 'Activer un projecteur pour surligner une région spécifique en maintenant une touche', + tags: ['Tool'], + author: { + name: 'Tony Cabaye', + link: 'https://github.com/tonai', + }, + repo: 'https://github.com/Smile-SA/slidev-component-spotlight', + }, + { + id: 'slidev-component-zoom', + name: 'Zooming', + description: 'Permettre le zoom dans les diapositives', + tags: ['Tool'], + author: { + name: 'Tony Cabaye', + link: 'https://github.com/tonai', + }, + repo: 'https://github.com/Smile-SA/slidev-component-zoom', + }, + { + id: 'slidev-addon-rabbit', + name: 'Rabbit', + description: 'Gestion du temps de présentation pour Slidev inspirée de Rabbit', + tags: ['Tool', 'Navigation'], + author: { + name: 'kaakaa', + link: 'https://github.com/kaakaa', + }, + repo: 'https://github.com/kaakaa/slidev-addon-rabbit', + }, + { + id: 'slidev-addon-stem', + name: 'STEM', + description: 'Addon Slidev pour les présentations scientifiques', + tags: ['Component', 'Layout'], + author: { + name: 'yutaka-shoji', + link: 'https://github.com/yutaka-shoji', + }, + repo: 'https://github.com/yutaka-shoji/slidev-addon-stem', + }, + { + id: 'slidev-addon-naive', + name: 'Naive UI', + description: 'Apporte les composants Naive UI dans Slidev', + tags: ['Component'], + author: { + name: 'Samuel Huang', + link: 'https://sghuang.com', + }, + repo: 'https://github.com/sghuang19/slidev-addon-naive', + }, + { + id: 'slidev-addon-hls-player', + name: 'HLS player', + description: 'Ajouter un lecteur vidéo basique propulsé par hls.js sur vos diapositives pour afficher des vidéos HTTP Live Streaming', + tags: ['hls', 'video'], + author: { + name: 'Albert Brand', + link: 'https://github.com/AlbertBrand', + }, + repo: 'https://github.com/AlbertBrand/slidev-addon-hls-player', + }, + { + id: 'slidev-addon-window-mockup', + name: 'Window Mockup', + description: 'Cadres de fenêtres stylisés', + tags: ['Component'], + author: { + name: 'whitphx', + link: 'https://github.com/whitphx', + }, + repo: 'https://github.com/whitphx/slidev-addon-window-mockup', + }, + { + id: 'slidev-addon-bpmn', + name: 'BPMN viewer', + description: 'Visualiser des fichiers BPMN dans vos diapositives', + tags: ['Component'], + author: { + name: 'emaarco', + link: 'https://github.com/emaarco', + }, + repo: 'https://github.com/emaarco/slidev-addon-bpmn', + }, + { + id: 'slidev-addon-dmn', + name: 'DMN viewer', + description: 'Afficher des tableaux de décision DMN et des diagrammes DRD dans vos diapositives', + tags: ['Component'], + author: { + name: 'emaarco', + link: 'https://github.com/emaarco', + }, + repo: 'https://github.com/emaarco/slidev-addon-dmn', + }, + { + id: 'slidev-addon-p5', + name: 'Runner for p5js', + description: 'Afficher, modifier et exécuter des croquis p5js dans vos diapositives', + tags: ['Component', 'Code runner'], + author: { + name: 'mjvo', + link: 'https://github.com/mjvo', + }, + repo: 'https://github.com/mjvo/slidev-addon-p5', + }, + { + id: 'slidev-pane', + name: 'slidev-pane', + description: 'Présentateur de volets style PowerPoint pour Slidev avec vignettes de diapositives, navigation rapide et canevas principal zoomable.', + tags: ['Navigation'], + author: { + name: 'xunz', + link: 'https://github.com/xunz3', + }, + repo: 'https://github.com/xunz3/slidev-pane', + }, + { + id: 'slidev-agent', + name: 'slidev-agent', + description: 'Addon Slidev et CLI wrapper pour la création de diapositives propulsée par LangChain.', + tags: ['Component', 'Integration'], + author: { + name: 'Christian Bromann', + link: 'https://github.com/christian-bromann', + }, + repo: 'https://github.com/christian-bromann/slidev-agent', + }, + { + id: 'slidev-addon-animated-text', + name: 'Animated text', + description: 'Texte animé trait par trait avec n\'importe quelle police en utilisant tegaki.', + tags: ['Component'], + author: { + name: 'Andreas Taranetz', + link: 'https://andreas.taranetz.com/', + }, + repo: 'https://github.com/andreas-taranetz/slidev-addon-animated-text', + }, + // Ajoutez votre addon ici! + { + id: '', + link: 'https://github.com/slidevjs/slidev/edit/main/docs/.vitepress/addons.ts', + name: 'Votre addon?', + description: 'Cliquez ici pour soumettre votre addon :)', + }, +] diff --git a/.vitepress/config.js b/.vitepress/config.js deleted file mode 100755 index adf4ecf..0000000 --- a/.vitepress/config.js +++ /dev/null @@ -1,300 +0,0 @@ -// @ts-check - -const Guide = [ - { - text: 'Pourquoi Slidev', - link: '/guide/why', - }, - { - text: 'Commencer', - link: '/guide/', - }, - { - text: 'Installation', - link: '/guide/install', - }, - { - text: 'Syntaxe Markdown', - link: '/guide/syntax', - }, - { - text: 'Navigation', - link: '/guide/navigation', - }, - { - text: 'Animations', - link: '/guide/animations', - }, - { - text: 'Exportation', - link: '/guide/exporting', - }, - { - text: 'Hébergement statique', - link: '/guide/hosting', - }, - { - text: 'Enregistrer la présentation', - link: '/guide/recording', - }, - { - text: 'Mode présentateur', - link: '/guide/presenter-mode', - }, - { - text: 'Dessins & Annotations', - link: '/guide/drawing', - }, - { - text: 'Intégrations de l\'éditeur', - link: '/guide/editors', - }, - { - text: 'FAQ', - link: '/guide/faq', - }, -] - -const Theme = [ - { - text: 'Utiliser un thème', - link: '/themes/use', - }, - { - text: 'Galerie de thèmes', - link: '/themes/gallery', - }, - { - text: 'Écrire un thème', - link: '/themes/write-a-theme', - }, -] - -const Addon = [ - { - text: 'Utiliser un Addon', - link: '/addons/use', - }, - { - text: 'Écrire un Addon', - link: '/addons/write-an-addon', - }, -] - -const Translations = [ - { - text: 'Français', - }, - { - text: 'English', - link: 'https://sli.dev{{pathname}}', - }, - { - text: '简体中文', - link: 'https://cn.sli.dev{{pathname}}', - }, - { - text: 'Español', - link: 'https://es.sli.dev{{pathname}}', - }, - { - text: 'Русский', - link: 'https://ru.sli.dev{{pathname}}', - }, - { - text: 'Việt Nam', - link: 'https://vn.sli.dev{{pathname}}', - }, - { - text: 'Deutsch', - link: 'https://de.sli.dev{{pathname}}', - }, - { - text: 'Português (BR)', - link: 'https://br.sli.dev{{pathname}}', - }, - { - text: 'Ελληνικά', - link: 'https://el.sli.dev{{pathname}}', - }, - { - text: '日本語', - link: 'https://ja.sli.dev{{pathname}}', - }, -] - -const Customizations = [ - { - text: 'Personnalisations', - link: '/custom/', - }, - { - text: 'Structure des répertoires', - link: '/custom/directory-structure', - }, - { - text: 'Polices', - link: '/custom/fonts', - }, - { - text: 'Surligneurs', - link: '/custom/highlighters', - }, - { - text: 'Configurer Vue', - link: '/custom/config-vue', - }, - { - text: 'Configurer Vite', - link: '/custom/config-vite', - }, - { - text: 'Configurer Windi CSS', - link: '/custom/config-windicss', - }, - { - text: 'Configurer Monaco', - link: '/custom/config-monaco', - }, - { - text: 'Configurer KaTeX', - link: '/custom/config-katex', - }, - { - text: 'Configurer Mermaid', - link: '/custom/config-mermaid', - }, - { - text: 'Configurer les Raccourcis', - link: '/custom/config-shortcuts', - }, - { - text: 'Contexte Global Vue', - link: '/custom/vue-context', - }, - { - text: 'Couches Globales', - link: '/custom/global-layers', - } -] - -const Resources = [ - { - text: 'Vitrines', - link: '/showcases', - }, - { - text: 'Ressources d\'apprentissage', - link: '/resources/learning', - }, - { - text: 'Couvertures organisées', - link: '/resources/covers', - }, -] - -const slidebars = [ - { - text: 'Guide', - children: Guide, - }, - { - text: 'Thèmes', - children: Theme, - }, - { - text: 'Addons', - children: Addon, - }, - { - text: 'Personnalisation', - children: Customizations, - }, - { - text: 'Intégrations', - children: [ - { - text: 'Composants', - link: '/builtin/components', - }, - { - text: 'Mises en page', - link: '/builtin/layouts', - }, - ], - }, -] - -/** - * @type {import('vitepress').UserConfig} - */ -module.exports = { - title: 'Slidev', - description: 'Diapositives de présentation pour les développeurs', - head: [ - ['link', { rel: 'icon', type: 'image/png', href: '/favicon.png' }], - ['meta', { name: 'author', content: 'Anthony Fu' }], - ['meta', { property: 'og:title', content: 'Slidev' }], - ['meta', { property: 'og:image', content: 'https://sli.dev/og-image.png' }], - ['meta', { property: 'og:description', content: 'Presentation slides for developers' }], - ['meta', { name: 'twitter:card', content: 'summary_large_image' }], - ['meta', { name: 'twitter:creator', content: '@slidevjs' }], - ['meta', { name: 'twitter:image', content: 'https://sli.dev/og-image.png' }], - ['link', { rel: 'dns-prefetch', href: 'https://fonts.gstatic.com' }], - ['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' }], - ], - themeConfig: { - repo: 'slidevjs/docs-fr', - logo: '/logo.svg', - docsBranch: 'main', - editLinks: true, - editLinkText: 'Suggérer un changement sur cette page', - - algolia: { - apiKey: '1a5c5a504139c58f428974c78c55291d', - indexName: 'slidev', - searchParameters: { - // for translations maintainers: change the filter to your locale code (subdomain name) - facetFilters: ['language:fr'] - } - }, - - nav: [ - { - text: 'Guide', - items: Guide, - }, - { - text: 'Thème', - items: Theme, - }, - { - text: 'Addon', - items: Addon, - }, - { - text: 'Personnaliser', - items: Customizations, - }, - { - text: 'Ressources', - items: Resources, - }, - { - text: 'Français', - items: Translations, - }, - ], - - sidebar: { - '/guide/': slidebars, - '/themes/': slidebars, - '/addons/': slidebars, - '/custom/': slidebars, - '/builtin/': slidebars, - '/resources/': slidebars, - '/': slidebars, - }, - }, -} diff --git a/.vitepress/config.ts b/.vitepress/config.ts new file mode 100644 index 0000000..0a99752 --- /dev/null +++ b/.vitepress/config.ts @@ -0,0 +1,169 @@ +import type { DefaultTheme } from 'vitepress' +import { fileURLToPath } from 'node:url' +import { transformerTwoslash } from '@shikijs/vitepress-twoslash' +import { defineConfig } from 'vitepress' +import { groupIconMdPlugin } from 'vitepress-plugin-group-icons' +import { version } from '../package.json' +import Customizations from './customizations' +import { Advanced, BuiltIn, Guides, Resources } from './pages' +import { getSidebarObject } from './sidebar-gen' + +export const slidebars: DefaultTheme.SidebarItem[] = [ + { + text: 'Guide', + items: Guides, + }, + { + text: 'Avancé', + items: Advanced, + }, + { + text: 'Personnalisations', + items: Customizations, + }, + { + text: 'Intégré', + items: BuiltIn, + }, + { + text: 'Ressources', + items: Resources, + }, +] + +export default defineConfig({ + title: 'Slidev', + description: 'Diapositives de présentation pour développeurs', + head: [ + ['link', { rel: 'icon', type: 'image/png', href: '/favicon.png' }], + ['meta', { name: 'author', content: 'Anthony Fu' }], + ['meta', { property: 'og:title', content: 'Slidev' }], + ['meta', { property: 'og:image', content: 'https://sli.dev/og-image.png' }], + ['meta', { property: 'og:description', content: 'Diapositives de présentation pour développeurs' }], + ['meta', { name: 'twitter:card', content: 'summary_large_image' }], + ['meta', { name: 'twitter:creator', content: '@slidevjs' }], + ['meta', { name: 'twitter:image', content: 'https://sli.dev/og-image.png' }], + ['link', { rel: 'dns-prefetch', href: 'https://fonts.gstatic.com' }], + ['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', + 'mermaid', + 'latex', + ) + }, + codeTransformers: [ + transformerTwoslash({ + twoslashOptions: { + // The @slidev/* installed in docs package are very old and should only be used in the homepage demo + vfsRoot: fileURLToPath(import.meta.url), + compilerOptions: { + resolveJsonModule: true, + moduleResolution: /* Bundler */ 100, + }, + }, + }), + ], + config(md) { + md.use(groupIconMdPlugin) + }, + }, + cleanUrls: true, + themeConfig: { + logo: '/logo.svg', + editLink: { + pattern: 'https://github.com/slidevjs/slidev/edit/main/docs/:path', + text: 'Suggérer des modifications sur cette page', + }, + + search: { + provider: 'local', + }, + + nav: [ + { + text: '📖 Guide', + items: [ + ...Guides, + { + text: 'Avancé', + items: Advanced, + }, + ], + }, + { + text: '✨ Fonctionnalités', + link: '/features/', + }, + { + text: 'Référence', + items: [ + { + text: 'Intégré', + items: BuiltIn, + }, + { + text: 'Personnaliser', + items: Customizations, + }, + ], + }, + { + text: 'Ressources', + items: Resources, + }, + ], + + 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, + '/addons/': slidebars, + '/custom/': slidebars, + '/builtin/': slidebars, + '/resources/': slidebars, + // eslint-disable-next-line antfu/no-top-level-await + ...await getSidebarObject(), + '/features/': [], + '/': slidebars, + }, + + footer: { + message: 'Publié sous la licence MIT.', + copyright: 'Copyright © 2020-2025 Anthony Fu.', + }, + }, + + locales: { + root: { + label: `Français (v${version})`, + }, + en: { + label: 'English', + link: 'https://sli.dev/', + }, + zh: { + label: '简体中文', + link: 'https://cn.sli.dev/', + }, + ja: { + label: '日本語', + link: 'https://ja.sli.dev/', + }, + }, +}) diff --git a/.vitepress/customizations.ts b/.vitepress/customizations.ts new file mode 100644 index 0000000..6c51973 --- /dev/null +++ b/.vitepress/customizations.ts @@ -0,0 +1,70 @@ +export default [ + { + text: 'Configurations', + link: '/custom/', + }, + { + text: 'Structure des répertoires', + link: '/custom/directory-structure', + }, + { + text: 'Configurer le colorateur syntaxique', + link: '/custom/config-highlighter', + }, + { + text: 'Configurer Vite et les plugins', + link: '/custom/config-vite', + }, + { + text: 'Configurer l\'application Vue', + link: '/custom/config-vue', + }, + { + text: 'Configurer UnoCSS', + link: '/custom/config-unocss', + }, + { + text: 'Configurer les exécuteurs de code', + link: '/custom/config-code-runners', + }, + { + text: 'Configurer les transformateurs', + link: '/custom/config-transformers', + }, + { + text: 'Configurer Monaco', + link: '/custom/config-monaco', + }, + { + text: 'Configurer KaTeX', + link: '/custom/config-katex', + }, + { + text: 'Configurer Mermaid', + link: '/custom/config-mermaid', + }, + { + text: 'Configurer le rendu Mermaid', + link: '/custom/config-mermaid-renderer', + }, + { + text: 'Configurer les routes', + link: '/custom/config-routes', + }, + { + text: 'Configurer les raccourcis', + link: '/custom/config-shortcuts', + }, + { + text: 'Configurer le menu contextuel', + link: '/custom/config-context-menu', + }, + { + text: 'Configurer les polices', + link: '/custom/config-fonts', + }, + { + text: 'Configurer le pré-analyseur', + link: '/custom/config-parser', + }, +] diff --git a/.vitepress/pages.ts b/.vitepress/pages.ts new file mode 100644 index 0000000..36e2e55 --- /dev/null +++ b/.vitepress/pages.ts @@ -0,0 +1,111 @@ +export const Guides = [ + { + text: 'Pourquoi Slidev', + link: '/guide/why', + }, + { + text: 'Pour commencer', + link: '/guide/', + }, + { + text: 'Guide de syntaxe', + link: '/guide/syntax', + }, + { + text: 'Interface utilisateur', + link: '/guide/ui', + }, + { + text: 'Animations', + link: '/guide/animations', + }, + { + text: 'Thèmes et addons', + link: '/guide/theme-addon', + }, + { + text: 'Composants', + link: '/guide/component', + }, + { + text: 'Mises en page', + link: '/guide/layout', + }, + { + text: 'Exporter', + link: '/guide/exporting', + }, + { + text: 'Hébergement', + link: '/guide/hosting', + }, + { + text: 'Travailler avec l\'IA', + link: '/guide/work-with-ai', + }, + { + text: 'FAQ', + link: '/guide/faq', + }, +] + +export const BuiltIn = [ + { + text: 'CLI', + link: '/builtin/cli', + }, + { + text: 'Composants', + link: '/builtin/components', + }, + { + text: 'Mises en page', + link: '/builtin/layouts', + }, +] + +export const Advanced = [ + { + text: 'Contexte global', + link: '/guide/global-context', + }, + { + text: 'Écrire des mises en page', + link: '/guide/write-layout', + }, + { + text: 'Écrire des thèmes', + link: '/guide/write-theme', + }, + { + text: 'Écrire des addons', + link: '/guide/write-addon', + }, +] + +export const Resources = [ + { + text: 'Exemples de réalisations', + link: '/resources/showcases', + }, + { + text: 'Galerie de thèmes', + link: '/resources/theme-gallery', + }, + { + text: 'Galerie d\'addons', + link: '/resources/addon-gallery', + }, + { + text: 'Ressources d\'apprentissage', + link: '/resources/learning', + }, + { + text: 'Couvertures sélectionnées', + link: '/resources/covers', + }, + { + text: 'Notes de version', + link: 'https://github.com/slidevjs/slidev/releases', + }, +] diff --git a/.vitepress/scripts/prepare.js b/.vitepress/scripts/prepare.js deleted file mode 100755 index c0e13b3..0000000 --- a/.vitepress/scripts/prepare.js +++ /dev/null @@ -1,8 +0,0 @@ -const fs = require('fs-extra') - -async function main(){ - await fs.remove('.vitepress/@slidev') - await fs.copy('node_modules/@slidev', '.vitepress/@slidev', { dereference: true }) -} - -main() diff --git a/.vitepress/showcases.ts b/.vitepress/showcases.ts old mode 100755 new mode 100644 index 7c4c6fa..fd4d1b6 --- a/.vitepress/showcases.ts +++ b/.vitepress/showcases.ts @@ -20,8 +20,8 @@ export const showcases: ShowCaseInfo[] = [ name: 'Anthony Fu', link: 'https://github.com/antfu', }, - slidesLink: 'https://sli.dev/demo/composable-vue', - sourceLink: 'https://github.com/antfu/talks/tree/master/2021-04-29', + slidesLink: 'https://talks.antfu.me/2021/composable-vue/', + sourceLink: 'https://github.com/antfu/talks/tree/main/2021-04-29', at: 'VueDay 2021', datetime: '2021-04-29', }, @@ -49,29 +49,29 @@ export const showcases: ShowCaseInfo[] = [ at: 'Enter.js Vue Day', datetime: '2021-06-15', }, - { - title: 'Simply Publish Your Package to npm', - author: { - name: 'Lucky Dewa Satria', - link: 'https://github.com/lucky401', - }, - at: 'Weekly sharing', - slidesLink: 'https://masukin.link/talks/simply-publish-your-package-to-npm', - cover: 'https://masukin.link/talks-cover-npm.png', - datetime: '2021-06-12', - }, - { - title: 'Create Icon Package With Vue and Rollup', - author: { - name: 'Lucky Dewa Satria', - link: 'https://github.com/lucky401', - }, - at: 'Weekly Sharing', - slidesLink: 'https://masukin.link/talks/create-icon-package-with-vue-and-rollup', - sourceLink: 'https://github.com/lucky401/Create-Icon-Package-With-Vue-and-Rollup', - cover: 'https://masukin.link/talks-cover-create-icon-package-with-vue-and-rollup.png', - datetime: '2021-06-19', - }, + // { + // title: 'Simply Publish Your Package to npm', + // author: { + // name: 'Lucky Dewa Satria', + // link: 'https://github.com/lucky401', + // }, + // at: 'Weekly sharing', + // slidesLink: 'https://masukin.link/talks/simply-publish-your-package-to-npm', + // cover: 'https://masukin.link/talks-cover-npm.png', + // datetime: '2021-06-12', + // }, + // { + // title: 'Create Icon Package With Vue and Rollup', + // author: { + // name: 'Lucky Dewa Satria', + // link: 'https://github.com/lucky401', + // }, + // at: 'Weekly Sharing', + // slidesLink: 'https://masukin.link/talks/create-icon-package-with-vue-and-rollup', + // sourceLink: 'https://github.com/lucky401/Create-Icon-Package-With-Vue-and-Rollup', + // cover: 'https://masukin.link/talks-cover-create-icon-package-with-vue-and-rollup.png', + // datetime: '2021-06-19', + // }, { title: 'BeAPT', author: { @@ -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,15 +132,205 @@ export const showcases: ShowCaseInfo[] = [ at: 'OpenFunction Tutorial Sharing', datetime: '2022-05-08', }, - // Add yours here! { - title: 'Yours?', + title: 'Is it Okay to Pursue Functional Programming on Frontend?', + author: { + name: 'Minsu Kim , Changhui Lee', + }, + at: '2022 JSConf Korea', + slidesLink: 'https://moonlit-nougat-422445.netlify.app/1', + sourceLink: 'https://github.com/alstn2468/2022-jsconf-presentation', + cover: 'https://raw.githubusercontent.com/alstn2468/2022-jsconf-presentation/main/public/images/og.png', + datetime: '2022-09-16', + }, + { + title: 'Blazing slidev ppt template with naive-ui', + author: { + name: 'godkun', + }, + at: 'personal sharing', + slidesLink: 'https://ppt.godkun.top', + sourceLink: 'https://github.com/godkun/ppt-template', + cover: 'https://github.com/godkun/ppt-template/raw/main/public/show.gif', + datetime: '2022-10-24', + }, + { + title: 'Building a Polite Popup with Nuxt 3', + author: { + name: 'Michael Hoffmann', + link: 'https://github.com/mokkapps', + }, + at: 'Vue.js Nation 2023', + slidesLink: 'https://vuejsnation-2023-talk-polite-popup.netlify.app', + sourceLink: 'https://github.com/Mokkapps/vuejsnation-2023-lightning-talk-polite-popup-nuxt-3-slides', + 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', + }, + { + title: 'Diablo Health Orb Shader', + author: { + name: 'SuneBear', + link: 'https://github.com/sunebear', + }, + at: 'rctAI Sessions', + slidesLink: 'https://rct-ai.github.io/frontend-slides/diablo-health-orb-shader/', + sourceLink: 'https://github.com/rct-ai/frontend-slides', + cover: 'https://github-production-user-asset-6210df.s3.amazonaws.com/7693264/284304324-db973b4c-a043-4644-932c-826169a1b4d8.gif', + datetime: '2022-09-01', + }, + { + title: 'Comparison of Packaging Tools in 2023', + author: { + name: 'Peacock (Yoichi Takai)', + link: 'https://p3ac0ck.net', + }, + at: 'PyCon APAC 2023', + slidesLink: 'https://slides.p3ac0ck.net/pyconapac2023/1', + sourceLink: 'https://github.com/peacock0803sz/slidev-slides/blob/7d41aa5e89ad8627cb68ae2cdbfe1681017b0408/talks/pyconapac2023/pyconapac2023.md', + cover: 'https://slides.p3ac0ck.net/pyconapac2023/cover.png', + datetime: '2023-10-28', + }, + { + title: 'How Rust error handling ease web development', + author: { + name: 'Nguyễn Hồng Quân', + link: 'https://quan.hoabinh.vn', + }, + at: 'FOSSASIA Summit 2024', + slidesLink: 'https://talk.quan.hoabinh.vn/rust-error-handling-ease-web-dev/', + sourceLink: 'https://hongquan@bitbucket.org/hongquan/rust-error-handling-ease-web-dev', + cover: 'https://i.imgur.com/2eBJofY.png', + datetime: '2024-04-10', + }, + { + title: 'Sit Back and Relax with Fault Awareness and Robust Instant Recovery for Large Scale AI Workloads', + author: { + name: 'Neko', + link: 'https://github.com/nekomeowww', + }, + at: 'KubeCon 2024 China', + slidesLink: 'https://talks.ayaka.io/nekoayaka/2024-08-21-kubecon-hk/', + sourceLink: 'https://github.com/nekomeowww/talks/tree/main/packages/2024-08-21-kubecon-hk', + cover: 'https://raw.githubusercontent.com/BaizeAI/talks/main/packages/2024-08-21-kubecon-hk/public/screenshot.png', + datetime: '2024-08-21', + }, + { + title: 'Hacker Numerology', + author: { + name: 'HD Moore', + link: 'https://hdm.io', + }, + at: 'LASCON 2024', + slidesLink: 'https://hdm.io/decks/2024-LASCON-Numerology/', + sourceLink: 'https://github.com/hdm/decks-2024-lascon-numerology.git', + cover: 'https://raw.githubusercontent.com/hdm/decks-2024-lascon-numerology/refs/heads/main/screenshot.png', + datetime: '2024-10-25', + }, + { + title: 'Python Zero To Hero - Episode 1', + author: { + name: 'Kareim Tarek', + link: 'https://kareimgazer.github.io/', + }, + at: 'Kareem Kreates YouTube Channel', + slidesLink: 'https://kareimgazer.github.io/py-intro/', + sourceLink: 'https://github.com/KareimGazer/py-intro', + cover: 'https://i.ytimg.com/vi/hVMaPBrWvAo/hqdefault.jpg', + datetime: '2025-01-12', + }, + { + title: 'Taming Dependency Chaos for LLM in K8s', + author: { + name: 'Neko', + link: 'https://github.com/nekomeowww', + }, + at: 'KubeCon 2025 China', + slidesLink: 'https://baizeai.github.io/talks/2025-06-11-kubecon-hk/', + sourceLink: 'https://github.com/BaizeAI/talks/tree/main/packages/2025-06-11-kubecon-hk', + cover: 'https://raw.githubusercontent.com/BaizeAI/talks/main/packages/2025-06-11-kubecon-hk/public/screenshot.png', + datetime: '2025-06-11', + }, + { + title: 'Single Image Super-Resolution Based on Capsule Neural Networks', + author: { + name: 'George Corrêa de Araújo', + link: 'https://george-gca.github.io/', + }, + at: 'Brazilian Conference on Intelligent Systems 2023', + slidesLink: 'https://george-gca.github.io/bracis_2023_srcaps/', + sourceLink: 'https://github.com/george-gca/bracis_2023_srcaps', + cover: 'https://raw.githubusercontent.com/george-gca/bracis_2023_srcaps/refs/heads/main/cover.png', + datetime: '2023-09-27', + }, + { + title: 'Threat Modeling', + author: { + name: 'guisso', + link: 'https://github.com/fguisso', + }, + at: 'OWASP Meetup', + slidesLink: 'https://guisso.dev/talks/threat-modeling', + sourceLink: 'https://github.com/fguisso/talks/tree/main/slides/threat-modeling', + cover: 'https://guisso.dev/posts/threat-modeling-intro/featured-threat-modeling_hu12396ec5bf9ecba1dda33f1443a5eb10_76776_600x0_resize_box_3.png', + datetime: '2023-09-22', + }, + { + title: 'A 14-year journey developing nCine, an open-source 2D game framework', + author: { + name: 'Angelo Theodorou', + link: 'https://encelo.github.io', + }, + at: '/dev/games/2025', + slidesLink: 'https://encelo.github.io/nCine_14Years_Presentation/', + sourceLink: 'https://github.com/encelo/nCine_14Years_Presentation', + cover: 'https://i.imgur.com/AbTdfhg.png', + datetime: '2025-06-05', + }, + { + title: 'Reverse Engineering Denuvo in Hogwarts Legacy', + author: { + name: 'Maurice Heumann', + link: 'https://momo5502.com', + }, + at: 'Navaja Negra 2025', + slidesLink: 'https://momo5502.com/slides/denuvo', + sourceLink: 'https://github.com/momo5502/denuvo-slides', + cover: 'https://raw.githubusercontent.com/momo5502/denuvo-slides/refs/heads/master/images/preview.png', + datetime: '2025-10-03', + }, + // Ajoutez votre présentation ici! + { + title: 'Votre présentation?', author: { name: '', }, - at: 'Submit your talk/presentation to be list here!', - slidesLink: 'https://github.com/slidevjs/docs/edit/main/.vitepress/showcases.ts', + at: 'Soumettez votre présentation pour être listé ici !', + slidesLink: 'https://github.com/slidevjs/slidev/edit/main/docs/.vitepress/showcases.ts', cover: `${import.meta.env.BASE_URL}theme-placeholder.png`, - datetime: '2021-04-29', + datetime: '2020-1-1', }, -] +].sort((a, b) => new Date(b.datetime).getTime() - new Date(a.datetime).getTime()) diff --git a/.vitepress/sidebar-gen.ts b/.vitepress/sidebar-gen.ts new file mode 100644 index 0000000..eb425fe --- /dev/null +++ b/.vitepress/sidebar-gen.ts @@ -0,0 +1,161 @@ +import type { DefaultTheme } from 'vitepress' +import { join } from 'node:path' +import { fileURLToPath } from 'node:url' +import fg from 'fast-glob' +import graymatter from 'gray-matter' + +const root = fileURLToPath(new URL('../../', import.meta.url)) + +const RE_HEADING1 = /^#\s+(.*)/m +const RE_HASH_FRAGMENT = /#.*$/ + +interface ParsedFile { + filepath: string + path: string + matter: graymatter.GrayMatterFile + title: string +} + +function parseFile(file: string) { + const filepath = join(root, file) + const path = file.replace('docs/', '').replace('.md', '') + const matter = graymatter.read(filepath) + const title = matter.data.title || matter.content.match(RE_HEADING1)?.[1] || path + return { + filepath, + path, + matter, + title, + } +} + +export async function getSidebarObject() { + const map: Record = {} + + const parsedFeatures: ParsedFile[] = await fg([ + 'docs/features/*.md', + ], { + onlyFiles: true, + cwd: root, + }) + .then(files => files.map(parseFile)) + + const parsedGuides: ParsedFile[] = await fg([ + 'docs/guide/*.md', + ], { + onlyFiles: true, + cwd: root, + }) + .then(files => files.map(parseFile)) + + const parsedCustoms: ParsedFile[] = await fg([ + 'docs/custom/*.md', + ], { + onlyFiles: true, + cwd: root, + }) + .then(files => files.map(parseFile)) + + parsedFeatures.forEach(({ matter, path }) => { + const items: DefaultTheme.SidebarItem[] = [ + { + text: 'Retour à', + items: [ + { + text: 'Toutes les fonctionnalités', + link: '/features', + }, + ], + }, + ] + + function findParsed(related: string) { + related = related.replace(RE_HASH_FRAGMENT, '') + const feature = parsedFeatures.find(file => file.path === related) + if (feature) { + return { + type: 'features', + item: feature, + } + } + const guide = parsedGuides.find(file => file.path === related) + if (guide) { + return { + type: 'guide', + item: guide, + } + } + const custom = parsedCustoms.find(file => file.path === related) + if (custom) { + return { + type: 'custom', + item: custom, + } + } + return undefined + } + + function frontmatterToSidebarItem(path: string | Record): DefaultTheme.SidebarItem[] { + if (typeof path === 'string') { + const match = findParsed(path) + if (match?.type === 'features') { + return [{ + text: `✨ ${match.item.title}`, + link: `/${path}`, + }] + } + if (match?.type === 'guide') { + return [{ + text: `📖 ${match.item.title}`, + link: `/${path}`, + }] + } + if (match?.type === 'custom') { + return [{ + text: `🛠️ ${match.item.title}`, + link: `/${path}`, + }] + } + console.warn(`Dependent file not found: ${path}`) + return [{ + text: path, + link: `/${path}`, + }] + } + else { + return Object.entries(path).map(([text, link]) => ({ + text, + link, + })) + } + } + + if (matter.data.depends) { + items.push({ + text: 'Dépend de', + items: matter.data.depends.flatMap(frontmatterToSidebarItem), + }) + } + + if (matter.data.relates) { + items.push({ + text: 'Lié à', + items: matter.data.relates.flatMap(frontmatterToSidebarItem), + }) + } + + const derives = matter.data.derives + ?? parsedFeatures.filter(f => f.matter.data.depends?.includes(path)).map(f => f.path) + + if (derives.length) { + items.push({ + text: 'Dérive de', + items: derives.flatMap(frontmatterToSidebarItem), + }) + } + + map[`/${path}`] = items + }) + + return map +} diff --git a/.vitepress/theme/Layout.vue b/.vitepress/theme/Layout.vue deleted file mode 100755 index 09f7c87..0000000 --- a/.vitepress/theme/Layout.vue +++ /dev/null @@ -1,166 +0,0 @@ - - - - - diff --git a/.vitepress/theme/NotFound.vue b/.vitepress/theme/NotFound.vue deleted file mode 100755 index 9ef4664..0000000 --- a/.vitepress/theme/NotFound.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/.vitepress/theme/components/AddonGallery.vue b/.vitepress/theme/components/AddonGallery.vue new file mode 100644 index 0000000..5b38da3 --- /dev/null +++ b/.vitepress/theme/components/AddonGallery.vue @@ -0,0 +1,18 @@ + + + diff --git a/.vitepress/theme/components/AddonInfo.vue b/.vitepress/theme/components/AddonInfo.vue new file mode 100644 index 0000000..1a44339 --- /dev/null +++ b/.vitepress/theme/components/AddonInfo.vue @@ -0,0 +1,57 @@ + + + diff --git a/.vitepress/theme/components/AlgoliaSearchBox.vue b/.vitepress/theme/components/AlgoliaSearchBox.vue deleted file mode 100755 index b9a5b7f..0000000 --- a/.vitepress/theme/components/AlgoliaSearchBox.vue +++ /dev/null @@ -1,173 +0,0 @@ - - - - - diff --git a/.vitepress/theme/components/BooleanDisplay.vue b/.vitepress/theme/components/BooleanDisplay.vue deleted file mode 100755 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 100755 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 old mode 100755 new mode 100644 similarity index 65% rename from .vitepress/theme/components/demo/Demo.vue rename to .vitepress/theme/components/Demo.vue index db88355..b7657c9 --- a/.vitepress/theme/components/demo/Demo.vue +++ b/.vitepress/theme/components/Demo.vue @@ -1,20 +1,22 @@