mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
feat(shortcode): add callout
Add warning that Alert shortcode will be deprecated and replaced with Callout. Also fix some old Academic refs.
This commit is contained in:
parent
841053c6c8
commit
bcf6297b11
5 changed files with 13 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
[module]
|
||||
[module.hugoVersion]
|
||||
# This version of Academic is compatible with the following Hugo versions:
|
||||
# This version of Wowchemy is compatible with the following Hugo versions:
|
||||
min = "0.73.0"
|
||||
extended = true
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Academic
|
||||
# Wowchemy
|
||||
|
||||
version = "4.8.0"
|
|
@ -3,7 +3,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="generator" content="Source Themes Academic {{ site.Data.academic.version }}">
|
||||
<meta name="generator" content="Wowchemy Hugo {{ site.Data.wowchemy.version }}">
|
||||
|
||||
{{ $scr := .Scratch }}
|
||||
|
||||
|
@ -138,15 +138,15 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $css_comment := printf "/*!* Source Themes Academic v%s (https://sourcethemes.com/academic/) */\n" site.Data.academic.version }}
|
||||
{{ $css_comment := printf "/*!* Wowchemy v%s (https://wowchemy.com/) */\n" site.Data.wowchemy.version }}
|
||||
{{ $css_bundle_head := $css_comment | resources.FromString "css/bundle-head.css" }}
|
||||
{{ $css_options := dict "targetPath" "css/academic.css" }}
|
||||
{{ $css_options := dict "targetPath" "css/wowchemy.css" }}
|
||||
{{- if (in (slice (getenv "HUGO_ENV") hugo.Environment) "production") -}}
|
||||
{{- $css_options = merge $css_options (dict "outputStyle" "compressed") -}}
|
||||
{{- end -}}
|
||||
{{ $sass_template := resources.Get "scss/main.scss" }}
|
||||
{{ $style := $sass_template | resources.ExecuteAsTemplate "main_parsed.scss" . | toCSS $css_options }}
|
||||
{{ $style := slice $css_bundle_head $style | resources.Concat "css/academic.css" }}
|
||||
{{ $style := slice $css_bundle_head $style | resources.Concat "css/wowchemy.css" }}
|
||||
{{- if (eq (getenv "HUGO_ENV") "production") -}}
|
||||
{{- $style = $style | minify | fingerprint "md5" -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
{{/* Todo: to be deprecated in favour of Callout. */}}
|
||||
{{ warnf "Alert shortcode will be deprecated in future. Use Callout instead. Rename `alert` to `callout` in %q" $.Page.Path }}
|
||||
<div class="alert alert-{{ .Get 0 }}">
|
||||
<div>
|
||||
{{ .Inner | markdownify | emojify }}
|
||||
|
|
5
wowchemy/layouts/shortcodes/callout.html
Normal file
5
wowchemy/layouts/shortcodes/callout.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div class="alert alert-{{ .Get 0 }}">
|
||||
<div>
|
||||
{{ .Inner | markdownify | emojify }}
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue