Skip to content

Commit

Permalink
resolves #433 add support for the built-in search plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Aug 12, 2021
1 parent 515c0e3 commit a13ab39
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ _presentation-docinfo-footer.html_

* Upgrade to reveal.js 4.1.2 (#370)
* Add support for the Auto-Animate feature (#439)
* Add support for the built-in search plugin (#441)
You can enable this plugin using `:revealjs_plugin_search: enabled`.

## 4.1.0 (2020-12-19)

Expand Down
26 changes: 26 additions & 0 deletions examples/search-plugin.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
= Search Plugin
:revealjs_plugin_search: enabled
:experimental:

== Search

Press kbd:[Ctrl+Shift+F] to search slide content. +
For instance, you can search "asciidoc".

Then, press kbd:[Enter] to navigate between search hits.

== Blank

😶

== Asciidoctor

Asciidoctor is a fast, open source text processor and publishing toolchain.

== Content


== AsciiDoc

AsciiDoc is a lightweight and semantic markup language primarily designed for writing technical documentation.
1 change: 1 addition & 0 deletions templates/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ def revealjs_dependencies(document, node, revealjsdir)
dependencies = []
dependencies << "{ src: '#{revealjsdir}/plugin/zoom/zoom.js', async: true, callback: function () { Reveal.registerPlugin(RevealZoom) } }" unless (node.attr? 'revealjs_plugin_zoom', 'disabled')
dependencies << "{ src: '#{revealjsdir}/plugin/notes/notes.js', async: true, callback: function () { Reveal.registerPlugin(RevealNotes) } }" unless (node.attr? 'revealjs_plugin_notes', 'disabled')
dependencies << "{ src: '#{revealjsdir}/plugin/search/search.js', async: true, callback: function () { Reveal.registerPlugin(RevealSearch) } }" if (node.attr? 'revealjs_plugin_search', 'enabled')
if (node.attr? 'revealjs_plugins') &&
!(revealjs_plugins_file = (node.attr 'revealjs_plugins', '').strip).empty? &&
!(revealjs_plugins_content = (File.read revealjs_plugins_file).strip).empty?
Expand Down

0 comments on commit a13ab39

Please sign in to comment.