diff options
author | mblum <me@mblum.me> | 2017-07-06 10:14:32 +0300 |
---|---|---|
committer | mblum <me@mblum.me> | 2017-07-07 06:11:41 +0300 |
commit | ce804750fb9c504bb42bbc5cb90d8b3b25ad38e4 (patch) | |
tree | 0da000e998ff72010b74617b12d7eabc2a23a0e4 | |
parent | b43e6bb501972a65024388e67445a78a3db0eaef (diff) |
[EMOJI] :sunglasses: support for emoji in titles, tags, and content across list and single layouts
-rw-r--r-- | README.md | 17 | ||||
-rw-r--r-- | exampleSite/content/post/emoji-support.md | 11 | ||||
-rw-r--r-- | exampleSite/content/post/javascript-support.md | 2 | ||||
-rw-r--r-- | exampleSite/content/post/sample.md | 8 | ||||
-rw-r--r-- | layouts/_default/list.html | 3 | ||||
-rw-r--r-- | layouts/_default/single.html | 3 | ||||
-rw-r--r-- | layouts/partials/post-metadata-list.html | 3 | ||||
-rw-r--r-- | layouts/partials/post-metadata-single.html | 3 | ||||
-rw-r--r-- | layouts/partials/tags.html | 3 |
9 files changed, 36 insertions, 17 deletions
@@ -1,6 +1,6 @@ # Hugo Now -![Hugo Now](https://raw.githubusercontent.com/mikeblum/hugo-now/master/static/logo/hugo-now.png) +![Powered By Hugo](https://raw.githubusercontent.com/mikeblum/hugo-now/master/static/logo/hugo-now.png) A Hugo port of [Jekyll Now](https://github.com/barryclark/jekyll-now). The Hugo implementation is inspired by [Hemingway](https://github.com/tanksuzuki/hemingway). @@ -56,9 +56,20 @@ Using the power of SASS to power our build pipeline. All major dependencies have <h3 class="mt-0">Modern Build Pipeline</h3> Without Jekyll's Asset pipeline, a Hugo theme needs a build system. I opted for <a href="http://gulpjs.com/">gulp.js</a> +<h3 class="mt-0">Emoji :sunglesses:</h3> +Support for emojis found here: <a href="https://www.webpagefx.com/tools/emoji-cheat-sheet/">Emoji Cheatsheet</a> + +Available for: + +- :white_check_mark: tags + +- :white_check_mark: titles + +- :white_check_mark: posts / .Content + <img src="https://raw.githubusercontent.com/mikeblum/hugo-now/master/static/images/pygments-logo.png" alt="pygments" width="120px" height="120px"></img> - <h3 class="mt-0">Syntax Highlighting</h3> +<h3 class="mt-0">Syntax Highlighting</h3> <p> Rather then using a JS library like <a href="https://highlightjs.org/">hightlight.js</a> I opt for server-side rendering with <a href="http://pygments.org/">Pygments</a> to keep in line with progressive enhamcements. Here is Hugo's <a href="https://gohugo.io/extras/highlighting">opinion</a> on the matter: <blockquote class="blockquote"> @@ -170,5 +181,5 @@ Hugo Now is licensed under the [MIT License](LICENSE.md). ## Credits -based on [Hemingway](https://github.com/tanksuzuki/hemingway) created by [Asuka Suzuki](https://github.com/tanksuzuki). +is based on [Hemingway](https://github.com/tanksuzuki/hemingway) created by [Asuka Suzuki](https://github.com/tanksuzuki). diff --git a/exampleSite/content/post/emoji-support.md b/exampleSite/content/post/emoji-support.md new file mode 100644 index 0000000..d07b3c8 --- /dev/null +++ b/exampleSite/content/post/emoji-support.md @@ -0,0 +1,11 @@ +--- +title: ":star: Emoji Support :exclamation:" +date: 2017-07-06T02:00:21-05:00 +tags: ["demo", "emoji", "feature", ":point_left:"] +--- + +<h1>:sushi: :beer:</h1> + +<!--more--> + +---
\ No newline at end of file diff --git a/exampleSite/content/post/javascript-support.md b/exampleSite/content/post/javascript-support.md index de29063..52b2390 100644 --- a/exampleSite/content/post/javascript-support.md +++ b/exampleSite/content/post/javascript-support.md @@ -1,7 +1,7 @@ --- title: "Javascript Support" date: 2017-07-04T20:55:50-05:00 -tags: ["bootstrap", "javascript", "noscript"] +tags: ["bootstrap", "javascript", "noscript", "demo", "feature"] --- <div class="well content-header"> diff --git a/exampleSite/content/post/sample.md b/exampleSite/content/post/sample.md index 5ce5799..1e6c23c 100644 --- a/exampleSite/content/post/sample.md +++ b/exampleSite/content/post/sample.md @@ -11,12 +11,4 @@ tags: ["blog", "post"] <!--this tag makes only images show on the main page--> <!--more--> ---- - -<!-- - Section links are seperated with a | ---> - -[Section A](#Section-A) | [Section B](#Section-B) - ---
\ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 9b5c3b6..6141237 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -7,7 +7,8 @@ <article> {{ partial "post-metadata-list" . }} <div class="content"> - {{ .Summary | safeHTML }} + <!-- supports emoji --> + {{ .Summary | emojify }} </div> </article> {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d81b873..00286e6 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -6,7 +6,8 @@ <article class="article"> {{ partial "post-metadata-single" . }} <div class="content"> - {{ .Content }} + <!-- supports emoji --> + {{ .Content | emojify }} </div> </article> </div> diff --git a/layouts/partials/post-metadata-list.html b/layouts/partials/post-metadata-list.html index 0bc38d7..8f96020 100644 --- a/layouts/partials/post-metadata-list.html +++ b/layouts/partials/post-metadata-list.html @@ -1,4 +1,5 @@ -<h1 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Draft }} ::Draft{{ end }} +<!-- supports emoji --> +<h1 class="title"><a href="{{ .Permalink }}">{{ .Title | emojify }}</a>{{ if .Draft }} ::Draft{{ end }} <small class="text-muted pull-right">{{ .Date.Format "January 2, 2006" }}</small> </h1> <div class="post-metadata"> diff --git a/layouts/partials/post-metadata-single.html b/layouts/partials/post-metadata-single.html index cddde50..f6fba70 100644 --- a/layouts/partials/post-metadata-single.html +++ b/layouts/partials/post-metadata-single.html @@ -1,4 +1,5 @@ -<h1 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a>{{ if .Draft }} ::Draft{{ end }}</h1> +<!-- supports emoji --> +<h1 class="title"><a href="{{ .Permalink }}">{{ .Title | emojify }}</a>{{ if .Draft }} ::Draft{{ end }}</h1> <div class="post-metadata"> {{ if (ne ($.Param "displayauthor") false) }} <small class="text-muted">by {{ .Params.author | default .Site.Params.author }}</small> diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html index 048e12f..25366c0 100644 --- a/layouts/partials/tags.html +++ b/layouts/partials/tags.html @@ -1,6 +1,7 @@ <div class="tags text-muted"> <i class="fa fa-tags" aria-hidden="true"></i> {{ range . }} - <a class="button is-link code" href="{{ "/tags/" | relURL }}{{ . | urlize }}">{{ . }}</a> + <!-- supports emoji --> + <a class="button is-link code" href="{{ "/tags/" | relURL }}{{ . | urlize }}">{{ . | emojify }}</a> {{ end }} </div>
\ No newline at end of file |