Skip to content

Commit

Permalink
Merge pull request #306 from MrBenWang/master
Browse files Browse the repository at this point in the history
#305 Use hugo v0.60 or later, bug fix for shortcodes
  • Loading branch information
xianmin committed Sep 9, 2020
2 parents 88bc8ad + a618bca commit 68e0de4
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
10 changes: 5 additions & 5 deletions assets/sass/_partial/_post/_shortcode_notice.scss
Expand Up @@ -2,7 +2,7 @@
// Shortcode Notice
// ==============================

.shortcode-notice p {
.shortcode-notice .notice-content {
padding: 0.6em 1em;
display: block;
font-size: 1em;
Expand All @@ -23,7 +23,7 @@
background-color: #6AB0DE;
}

.shortcode-notice.note p {
.shortcode-notice.note .notice-content {
background: #E7F2FA;
}

Expand All @@ -32,7 +32,7 @@
background-color: rgba(92, 184, 92, 0.8);
}

.shortcode-notice.tip p {
.shortcode-notice.tip .notice-content {
background: #E6F9E6;
}

Expand All @@ -41,7 +41,7 @@
background-color: #F0B37E;
}

.shortcode-notice.info p {
.shortcode-notice.info .notice-content {
background: #FFF2DB;
}

Expand All @@ -50,6 +50,6 @@
background-color: rgba(217, 83, 79, 0.8);
}

.shortcode-notice.warning p {
.shortcode-notice.warning .notice-content {
background: #FAE2E2;
}
8 changes: 8 additions & 0 deletions exampleSite/full-config.toml
Expand Up @@ -230,3 +230,11 @@ defaultContentLanguage = "en" # Default language to use
# [languages.zh-cn]
# title = "Jane —— 一个简洁的 Hugo 主题"
# weight = 2


# more information https://gohugo.io/getting-started/configuration-markup/#goldmark
[markup]
defaultMarkdownHandler = "goldmark" # blackfriday or goldmark
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
2 changes: 1 addition & 1 deletion layouts/shortcodes/expand.html
Expand Up @@ -3,5 +3,5 @@
{{ with .Get 0}}{{.}}
{{else}}Click to expand{{ end }}
</summary>
{{.Inner}}
{{ .Inner | markdownify }}
</details>
8 changes: 4 additions & 4 deletions layouts/shortcodes/notice.html
@@ -1,10 +1,10 @@
<div class="shortcode-notice {{ .Get 0 }}">
<div class="shortcode-notice-title {{ .Get 0 }}">
{{ if len .Params | eq 2 }}
{{- if len .Params | eq 2 -}}
{{ .Get 1 }}
{{ else }}
{{ .Get 0 }}
{{ end }}
{{- end -}}
</div>
{{ .Inner }}
</div>
<div class="notice-content">{{ .Inner | markdownify }}</div>
</div>

Large diffs are not rendered by default.

@@ -1 +1 @@
{"Target":"sass/jane.min.af20b78e95c84de86b00a0242a4a77bd2601700e1b250edf27537d957ac0041d.css","MediaType":"text/css","Data":{"Integrity":"sha256-ryC3jpXITehrAKAkKkp3vSYBcA4bJQ7fJ1N9lXrABB0="}}
{"Target":"sass/jane.min.b3a8813c06e6d785beba22bf8264e174fa2cb3a396b22f9ba24e2c00c18aaf7f.css","MediaType":"text/css","Data":{"Integrity":"sha256-s6iBPAbm14W+uiK/gmThdPoss6OWsi+bok4sAMGKr38="}}

0 comments on commit 68e0de4

Please sign in to comment.