Token导航 LogoToken导航TokenDH.com
运维和基础设施敏感数据github未标认证来源可访问clear审计通过

slidev-deployment幻灯片部署

Agent Skill

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

总安装

1,797

周安装

72

GitHub Stars

27

下载量

582
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:slidev-deployment(幻灯片部署)
来源仓库:https://github.com/yoanbernabeu/slidev-skills
仓库路径:skills/slidev-deployment
安装命令:
npx skills add https://github.com/yoanbernabeu/slidev-skills --skill slidev-deployment
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/yoanbernabeu/slidev-skills --skill slidev-deployment

简介

slidev-deployment 用于辅助云资源、部署、容器和基础设施管理任务,适合检查配置和整理部署步骤。

  • 适用于 Slidev 项目的部署与运维自动化场景。
  • 通过 npx skills add 命令从 GitHub 安装,需明确目标环境和账号权限。
  • 涉及删除资源或修改网络配置时应先确认影响范围,区分测试与生产操作。
  • 注意该技能当前无详细功能说明,建议进一步查阅源码以了解实际能力边界。

SKILL.md

Deploying Slidev Presentations

This skill covers deploying Slidev presentations as static websites to various hosting platforms, making your presentations accessible online.

When to Use This Skill

  • Sharing presentations via URL
  • Hosting for conferences/events
  • Creating permanent presentation archives
  • Setting up CI/CD for presentations
  • Embedding presentations in websites

Building for Production

Build Command

npx slidev build

Or via npm script:

npm run build

Output

Creates dist/ directory containing:

  • index.html
  • JavaScript bundles
  • CSS files
  • Asset files

Build Options

# Custom output directory
npx slidev build --out public

# With base path (for subdirectories)
npx slidev build --base /presentations/my-talk/

# Enable PDF download
npx slidev build --download

# Exclude presenter notes (security)
npx slidev build --without-notes

GitHub Pages

Method 1: GitHub Actions (Recommended)

  1. Enable GitHub Pages:

- Go to Settings → Pages - Source: GitHub Actions

  1. Create workflow file .github/workflows/deploy.yml:
name: Deploy Slidev

on:
  push:
    branches: [main]
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Build
        run: npm run build -- --base /${{ github.event.repository.name }}/

      - name: Upload artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: dist

  deploy:
    needs: build
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4
  1. Push to trigger deployment
  2. Access at: https://<username>.github.io/<repo>/

Method 2: gh-pages Branch

npm install -D gh-pages

Add to package.json:

{
  "scripts": {
    "deploy": "slidev build --base /repo-name/ && gh-pages -d dist"
  }
}

Then:

npm run deploy

Netlify

Method 1: Netlify UI

  1. Push code to GitHub/GitLab
  2. Connect repo in Netlify dashboard
  3. Configure:

- Build command: npm run build - Publish directory: dist

Method 2: netlify.toml

Create netlify.toml:

[build]
  command = "npm run build"
  publish = "dist"

[build.environment]
  NODE_VERSION = "20"

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

Push and Netlify auto-deploys.

Custom Domain

In Netlify dashboard:

  1. Domain settings
  2. Add custom domain
  3. Configure DNS

Vercel

Method 1: Vercel CLI

npm install -g vercel
vercel

Method 2: vercel.json

Create vercel.json:

{
  "buildCommand": "npm run build",
  "outputDirectory": "dist",
  "framework": null,
  "rewrites": [
    { "source": "/(.*)", "destination": "/index.html" }
  ]
}

Automatic Deployment

  1. Import project in Vercel dashboard
  2. Connect GitHub repo
  3. Vercel auto-detects and deploys

Cloudflare Pages

Setup

  1. Connect repo in Cloudflare Pages
  2. Configure:

- Build command: npm run build - Output directory: dist

  1. Deploy

wrangler.toml (Optional)

name = "my-presentation"
compatibility_date = "2024-01-01"

[site]
bucket = "./dist"

Docker

Dockerfile

FROM node:20-alpine as builder

WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

nginx.conf

events {
    worker_connections 1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    server {
        listen 80;
        server_name localhost;
        root /usr/share/nginx/html;
        index index.html;

        location / {
            try_files $uri $uri/ /index.html;
        }
    }
}

Build and Run

docker build -t my-presentation .
docker run -p 8080:80 my-presentation

Docker Compose

version: '3.8'
services:
  presentation:
    build: .
    ports:
      - "8080:80"
    restart: unless-stopped

Self-Hosted (Static Server)

Using serve

npm install -g serve
npm run build
serve dist

Using http-server

npm install -g http-server
npm run build
http-server dist

Using Python

npm run build
cd dist
python -m http.server 8080

Base Path Configuration

For Subdirectories

If hosting at https://example.com/slides/:

npx slidev build --base /slides/

Or in frontmatter:

---
base: /slides/
---

Root Path

If hosting at root https://example.com/:

npx slidev build --base /

Security Considerations

Excluding Presenter Notes

npx slidev build --without-notes

Removes speaker notes from built version.

Password Protection

For private presentations:

Netlify: Use Netlify Identity or password protection feature.

Vercel: Use Vercel Authentication.

Custom: Add basic auth in server config.

No Remote Control in Build

Built presentations don't include remote control by default.

Environment Variables

In Build

Create .env:

VITE_API_URL=https://api.example.com

Access in slides:

<script setup>
const apiUrl = import.meta.env.VITE_API_URL
</script>

Platform-Specific

Set in platform dashboards (Netlify, Vercel, etc.)

Custom Domain Setup

DNS Configuration

TypeNameValue
CNAMEwwwplatform-subdomain
A@Platform IP

SSL/HTTPS

Most platforms provide free SSL:

  • Netlify: Automatic
  • Vercel: Automatic
  • Cloudflare: Automatic
  • GitHub Pages: Automatic

CI/CD Workflows

GitHub Actions (Full Example)

name: Build and Deploy

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      - name: Install
        run: npm ci

      - name: Build
        run: npm run build

      - name: Export PDF
        run: npm run export

      - name: Upload Build
        uses: actions/upload-artifact@v4
        with:
          name: dist
          path: dist/

      - name: Upload PDF
        uses: actions/upload-artifact@v4
        with:
          name: pdf
          path: '*.pdf'

  deploy:
    needs: build
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    steps:
      - name: Download Build
        uses: actions/download-artifact@v4
        with:
          name: dist
          path: dist/

      - name: Deploy to Production
        # Add your deployment step

Troubleshooting

Build Fails

  1. Check Node version (≥18)
  2. Clear node_modules: rm -rf node_modules && npm install
  3. Check for syntax errors in slides

Assets Not Loading

  1. Verify base path configuration
  2. Check asset paths (use / prefix for public/)
  3. Rebuild with correct base

Fonts Missing

  1. Use web fonts
  2. Check font loading in styles

Blank Page After Deploy

  1. Check browser console for errors
  2. Verify SPA routing configuration
  3. Check base path matches URL

Best Practices

  1. Test Build Locally: npm run build && npx serve dist
  2. Use CI/CD: Automate deployments
  3. Version Your Deployments: Use git tags
  4. Monitor Performance: Check load times
  5. Keep URLs Stable: Don't change paths frequently

Output Format

When deploying:

PLATFORM: [GitHub Pages | Netlify | Vercel | Docker]

BUILD COMMAND:
npm run build --base [path]

CONFIGURATION FILES:
- [config file name and content]

DEPLOYMENT URL:
https://[your-domain]/[path]/

CHECKLIST:
- [ ] Build succeeds locally
- [ ] Assets load correctly
- [ ] Base path configured
- [ ] SSL/HTTPS enabled
- [ ] (Optional) Custom domain
- [ ] (Optional) Password protection

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

29.63%
按下载量换算172

OpenCode

25.55%
按下载量换算149

Gemini CLI

17.8%
按下载量换算104

continue

13%
按下载量换算76

Antigravity

9.48%
按下载量换算55

Codex

3.47%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills