我正在尝试使用外部插件部署 Reveal.js 演示文稿,https://github.com/janschoepke/reveal_externa。 问题是,部署时,它显示以下错误:
以我的低理解,这意味着它无法找到我的html源,我尝试了一些基本的建议,比如改变我编写路径的方式等等,但到目前为止没有任何效果。
为了以防万一,我将添加一个指向我的存储库的链接。 这里
另外,这是我的文件夹的分布,html 文件位于演示文件夹中。
这是我的索引 html:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Curso OpenGL</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/serif.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section data-external="presentation/title.html"></section>
<section data-external="presentation/content.html"></section>
<section data-external-replace="presentation/basics/introduction.html"></section>
<section data-external-replace="presentation/development enviroment/DE.html"></section>
<section data-external-replace="presentation/fundaments/fundamentals.html"></section>
<section data-external-replace="presentation/basicFigures/BF.html"></section>
<section data-external-replace="presentation/geometricTransformations/gt.html"></section>
<section data-external-replace="presentation/camara/pc.html"></section>
<section data-external-replace="presentation/shadows/is.html"></section>
<section data-external-replace="presentation/texture/texture.html"></section>
<section data-external-replace="presentation/animation/animation.html"></section>
<section data-external-replace="presentation/user/userInteraction.html"></section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script src="plugin/notes/notes.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script src="plugin/zoom/zoom.js"></script>
<script>
// More info about initialization & config:
// - https://revealjs.com/initialization/
// - https://revealjs.com/config/
Reveal.initialize({
hash: true,
dependencies: [
{
src: 'node_modules/reveal_external/external/external.js',
condition: function() {
return !!document.querySelector( '[data-external],[data-external-replace]' );
}
},
],
plugins: [ RevealZoom, RevealNotes, RevealMarkdown, RevealHighlight ],
// Learn about plugins: https://revealjs.com/plugins/
});
</script>
</body>
</html>
我尝试过更改路径格式,仅使用 dist 文件夹部署分支,也许解决方案或答案非常明显,但我无法破解它。
我对这一切都很陌生,特别是部署的概念,所以这是一个相当困境的情况。
更新: 我尝试使用插件文件夹中的外部插件进行部署,还更改了路径以避免指向node_modules的路径,在开发服务器本地工作正常,部署显示相同的错误,因此我假设在所有尝试中至少包含该插件。