SuperAPI AI 工具集

quarto-netlify

通用与其它

查看项目

更新于 10-16 03:04

技能介绍

用途:用于将 Quarto 项目部署到 Netlify,并支持 RevealJS 演示文稿。适用场景包括:把 Quarto 项目部署到 Netlify、用 Quarto 设置 RevealJS 演示、为 Quarto 站点配置自动化构建,以及需要使用已验证的 netlify.toml 配置时。

主要配置:_quarto.yml 中设置 project 类型为 default,output-dir 为 _site,指定 render 的 index.qmd;format.revealjs 可设置 output-file、theme(含 custom.scss)、slide-number 等。netlify.toml 使用已验证的构建模式:build.command 通过 curl 下载 quarto-linux-amd64.deb,用 dpkg -x 解压到当前目录,设置 PATH=$PWD/opt/quarto/bin,再执行 quarto render;publish 指向 _site;并配置从 / 到 /slides.html 的 302 重定向。

关键点:使用 .deb 包配合 dpkg -x 解压,而非 tar.gz;解压到当前目录而非子文件夹;路径为 $PWD/opt/quarto/bin;直接运行 quarto render(自动读取 _quarto.yml)。.gitignore 忽略 /.quarto/、/_site/、node_modules/ 等。Makefile 提供 render、preview、clean 目标。RevealJS 扩展可复制 _extensions/ 文件夹,包括 simplemenu、reveal-auto-agenda、code-fullscreen、codefocus。

部署步骤:用 gh repo create 创建公开仓库并添加远端,git push -u origin main;在 Netlify 从 GitHub 导入,自动检测 netlify.toml;推送到 main 时触发部署。

限制:资料未提供具体版本要求、其他平台支持、价格或更多扩展细节。