diff --git a/ct/slidev.sh b/ct/slidev.sh new file mode 100644 index 0000000000..c32b94485d --- /dev/null +++ b/ct/slidev.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main" +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Filan-glitch +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE +# Source: https://sli.dev/ + +APP="Slidev" +var_tags="${var_tags:-presentation;markdown}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-6}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" +#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if [[ ! -d /opt/slidev/node_modules/@slidev/cli ]]; then + msg_error "No Slidev Installation Found!" + exit + fi + + if check_for_gh_release "slidev" "slidevjs/slidev"; then + NODE_VERSION="24" setup_nodejs + + msg_info "Stopping Slidev" + systemctl stop slidev + msg_ok "Stopped Slidev" + + msg_info "Updating Slidev" + cd /opt/slidev + $STD npm install "@slidev/cli@${CHECK_UPDATE_RELEASE#v}" + $STD npm update + cat <~/.slidev +${CHECK_UPDATE_RELEASE#v} +EOF + msg_ok "Updated Slidev" + + msg_info "Starting Slidev" + systemctl start slidev + msg_ok "Started Slidev" + msg_ok "Updated successfully!" + fi + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW}Access it using the following URL:${CL}" +echo -e "${GATEWAY}${BGN}http://${IP}:3030${CL}" diff --git a/install/slidev-install.sh b/install/slidev-install.sh new file mode 100644 index 0000000000..90741987a9 --- /dev/null +++ b/install/slidev-install.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Filan-glitch +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE +# Source: https://sli.dev/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +NODE_VERSION="24" setup_nodejs + +msg_info "Installing Slidev" +cd /opt +$STD npx --yes create-slidev@latest slidev ~/.slidev +$(node -p "require('/opt/slidev/node_modules/@slidev/cli/package.json').version") +EOF +msg_ok "Installed Slidev" + +msg_info "Creating Service" +cat </etc/systemd/system/slidev.service +[Unit] +Description=Slidev +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +WorkingDirectory=/opt/slidev +ExecStart=/opt/slidev/node_modules/.bin/slidev slides.md --remote --port 3030 +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now slidev +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc diff --git a/json/slidev.json b/json/slidev.json new file mode 100644 index 0000000000..bff4b477d9 --- /dev/null +++ b/json/slidev.json @@ -0,0 +1,51 @@ +{ + "name": "Slidev", + "slug": "slidev", + "categories": [ + 12 + ], + "date_created": "2026-11-17", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3030, + "documentation": "https://sli.dev/guide/", + "website": "https://sli.dev/", + "repository": "https://github.com/slidevjs/slidev", + "architectures": ["amd64"], + "platforms": ["pve"], + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/slidev.webp", + "description": "Slidev is a slide deck maker and presenter for developers. Slides are written in Markdown with Vue components, code highlighting, LaTeX and diagrams, and served with live reload, presenter mode, remote control and a built-in MCP server that lets AI agents edit the deck.", + "install_methods": [ + { + "type": "default", + "script": "ct/slidev.sh", + "config_path": "/opt/slidev/slides.md", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 6, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Slidev has no authentication: anyone who can reach port 3030 can present, edit the slides and use the MCP endpoint. Keep it on a trusted network.", + "type": "warning" + }, + { + "text": "The deck lives in /opt/slidev/slides.md. AI agents can edit it over MCP at http://:3030/__mcp.", + "type": "info" + }, + { + "text": "To reach it through a hostname or reverse proxy, add that host to server.allowedHosts in /opt/slidev/vite.config.ts.", + "type": "info" + } + ] +}