Skip to content

Commit

Permalink
Fix Prism plugin import for Hugo v0.123+. Closes #259
Browse files Browse the repository at this point in the history
  • Loading branch information
schnerring committed Mar 7, 2024
1 parent 7a2afd7 commit d04cd10
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions assets/css/non-critical/00-vendor.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*! purgecss start ignore */

/* Prism Plugins */
{{ range $.Site.Params.prism.plugins }}
{{ $path := printf "prismjs/plugins/%s/prism-%s.css" . . }}
{{ $plugin := resources.Get $path }}
{{ if $plugin }}
{{ printf "/*%s*/" $plugin }}
@import "{{ $plugin }}";
{{ $pluginCSS := resources.Get $path }}
{{ if $pluginCSS }}
{{ $importPath := trim $pluginCSS.RelPermalink "/" }}
{{ printf "/* Import stylesheet for Prism plugin '%s' from '%s' */" . $importPath }}
@import "{{ $importPath }}";
{{ end }}
{{ end }}
Expand Down

0 comments on commit d04cd10

Please sign in to comment.