mirror of
https://github.com/Threnklyn/reveal-hugo.git
synced 2026-06-06 21:50:48 +02:00
Support custom_theme_options param to customize asset compilation
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
<!-- Theme used for presentation -->
|
||||
{{- $reveal_location := $.Param "reveal_hugo.reveal_cdn" | default "reveal-js" -}}
|
||||
{{- $highlight_location := $.Param "reveal_hugo.highlight_cdn" | default "highlight-js" -}}
|
||||
|
||||
{{- $custom_theme := $.Param "reveal_hugo.custom_theme" -}}
|
||||
<link rel="stylesheet" href="{{ printf "%s/css/reveal.css" $reveal_location | relURL }}">
|
||||
{{- $custom_theme := $.Param "reveal_hugo.custom_theme" -}}
|
||||
{{- if $custom_theme -}}
|
||||
{{- $custom_theme_options := $.Param "reveal_hugo.custom_theme_options" | default dict -}}
|
||||
{{- if $.Param "reveal_hugo.custom_theme_compile" -}}
|
||||
{{ $asset := resources.Get $custom_theme | toCSS | minify | fingerprint }}
|
||||
{{ $asset := resources.Get $custom_theme | toCSS $custom_theme_options | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $asset.Permalink }}" id="theme">
|
||||
{{- else -}}
|
||||
<link rel="stylesheet" href="{{ $custom_theme | relURL }}" id="theme">
|
||||
|
||||
Reference in New Issue
Block a user