mirror of
https://github.com/Threnklyn/reveal-hugo.git
synced 2026-06-05 21:28:28 +02:00
Add reveal_hugo.load_default_plugins option
This commit is contained in:
@@ -47,12 +47,14 @@
|
||||
</script>
|
||||
<!-- load Reveal.js plugins after Reveal.js is initialized -->
|
||||
<script type="text/javascript" src="{{ printf "%s/lib/js/classList.js" $reveal_location | relURL }}"></script>
|
||||
{{ $default_plugins := slice "plugin/markdown/marked.js" "plugin/markdown/markdown.js" "plugin/highlight/highlight.js" "plugin/zoom-js/zoom.js" }}
|
||||
{{ range $default_plugins }}
|
||||
<script type="text/javascript" src="{{ printf "%s/%s" $reveal_location . | relURL }}"></script>
|
||||
{{ if $.Param "reveal_hugo.load_default_plugins" | default true }}
|
||||
{{ $default_plugins := slice "plugin/markdown/marked.js" "plugin/markdown/markdown.js" "plugin/highlight/highlight.js" "plugin/zoom-js/zoom.js" }}
|
||||
{{ range $default_plugins }}
|
||||
<script type="text/javascript" src="{{ printf "%s/%s" $reveal_location . | relURL }}"></script>
|
||||
{{ end }}
|
||||
<!-- always use local version of the notes plugin since HTML file it requires isn't on CDN -->
|
||||
<script type="text/javascript" src="{{ "reveal-js/plugin/notes/notes.js" | relURL }}"></script>
|
||||
{{ end }}
|
||||
<!-- always use local version of the notes plugin since HTML file it requires isn't on CDN -->
|
||||
<script type="text/javascript" src="{{ "reveal-js/plugin/notes/notes.js" | relURL }}"></script>
|
||||
<!-- load custom plugins locally only (not CDN since many plugins won't exist there) -->
|
||||
{{ range $.Param "reveal_hugo.plugins" }}
|
||||
<script type="text/javascript" src="{{ . | relURL }}"></script>
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
{{- $theme := $.Param "reveal_hugo.theme" | default "black" -}}
|
||||
<link rel="stylesheet" href="{{ printf "%s/css/theme/%s.css" $reveal_location $theme | relURL }}" id="theme">
|
||||
{{ end -}}
|
||||
<!-- Theme used for syntax highlighting of code -->
|
||||
{{- $highlight_theme := $.Param "reveal_hugo.highlight_theme" | default "default" -}}
|
||||
<link rel="stylesheet" href="{{ printf "%s/%s.min.css" $highlight_location $highlight_theme | relURL }}">
|
||||
{{ if $.Param "reveal_hugo.load_default_plugins" | default true -}}
|
||||
<!-- Theme used for syntax highlighting of code -->
|
||||
{{- $highlight_theme := $.Param "reveal_hugo.highlight_theme" | default "default" -}}
|
||||
<link rel="stylesheet" href="{{ printf "%s/%s.min.css" $highlight_location $highlight_theme | relURL }}">
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user