Skip to content

Commit

Permalink
Add support emojis (#184)
Browse files Browse the repository at this point in the history
* layout, index: render markdown emoji in section titles
* exampleSite, config: enable emoji rendering in markdown files
  • Loading branch information
filippofontana authored Jun 1, 2024
1 parent 4191af6 commit e13ca19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ title = "Jane Doe - Nutrition Coach & Chef Consultant"
# In order to add version information in the page's footer set to true.
# enableGitInfo = true

# enable emoji processing in Markdown (valid only for pure markdown content)
enableEmoji = true

# Theme-specific variables `.Site.Params.myParamName`
[params]

Expand Down
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<div class='post-holder{{ if and (ne .Site.Params.invertSectionColors true) (not (modBool $index_val 2)) }} dark{{ else if and (eq .Site.Params.invertSectionColors true) (modBool $index_val 2) }} dark{{ end }}'>
<article id='{{ anchorize $fnav_title }}' class='post {{ if eq $index_val 0 }}first{{ end }} {{ if eq (add $index_val 1) (len $content) }}last{{ end }}'>
<header class="post-header">
<h2 class="post-title">{{ .Title | safeHTML }}</h2>
<h2 class="post-title">{{ .Title | emojify | safeHTML }}</h2>
</header>
<section class="post-content">
{{ .Content }}
Expand Down

0 comments on commit e13ca19

Please sign in to comment.