Reveal.js 特定幻灯片的可共享链接/重新加载时保持当前幻灯片

Reveal.js Sharable links to specific slide / Keep current slide on reload

使用 Reveal.js,我找不到有关此功能的任何文档。我肯定我在某个地方见过这个。而且我肯定希望能够重新加载页面,而不必每次都浏览整个平台。

它是否作为隐藏功能存在?有人知道 "plugin" 或补丁吗?

诀窍是在index.html页面末尾的配置中设置history: true

Reveal.initialize({
    history: true,
    ...

2022 年与 Reveal.JS 4.3.1 相关的更新:

历史技巧不再有效,请改用hash

 new Reveal({
    plugins: [Markdown, Highlight],
    hash: true,
  }).initialize();

Link to the documentation