From f4c9fe750de9ad242d68906b728efa0fb4b2c407 Mon Sep 17 00:00:00 2001 From: Dillon Date: Wed, 6 May 2020 21:31:37 +0800 Subject: [PATCH 1/5] fix(shortcode): style shortcode scss file path (#327) --- layouts/_default/baseof.html | 2 +- layouts/shortcodes/style.html | 5 +++-- .../id-1.scss_3bfbc84092731480b8d374981b54d253.content} | 0 .../id-1.scss_3bfbc84092731480b8d374981b54d253.json | 1 + .../id-1.scss_e5494f82a408608c874431b5dcdb4f1e.content | 2 ++ .../id-1.scss_e5494f82a408608c874431b5dcdb4f1e.json | 1 + .../id-1.scss_4bcd2a22db7c9ce77fc96c1aa4d683bd.content | 2 ++ .../id-1.scss_4bcd2a22db7c9ce77fc96c1aa4d683bd.json | 1 + .../id-1.scss_66d6eb926874a089016353786f28e165.content | 2 ++ .../id-1.scss_66d6eb926874a089016353786f28e165.json | 1 + .../id-1.scss_78b750e0fe281aa9b91566ae181c2e40.content | 4 ++++ .../id-1.scss_78b750e0fe281aa9b91566ae181c2e40.json | 1 + .../id-1.scss_0d902f60eb581fec9411dd1846631db7.content | 4 ++++ .../id-1.scss_0d902f60eb581fec9411dd1846631db7.json | 1 + .../id-1.scss_a7b5c907db9ad46c812c6b1bf9d871a7.content | 2 ++ .../id-1.scss_a7b5c907db9ad46c812c6b1bf9d871a7.json | 1 + .../id-1.scss_da37cb970ff275a236f7c8e80f90244b.content | 2 ++ .../id-1.scss_da37cb970ff275a236f7c8e80f90244b.json | 1 + .../id-1.scss_8bcb276b6f7024fb75f6398ae3519592.content | 4 ++++ .../id-1.scss_8bcb276b6f7024fb75f6398ae3519592.json | 1 + .../stype/id-1.scss_ff2a8d7d59c25f259218399bceecc7ea.json | 1 - 21 files changed, 35 insertions(+), 4 deletions(-) rename resources/_gen/assets/scss/{stype/id-1.scss_ff2a8d7d59c25f259218399bceecc7ea.content => style/06219b515bd3039bce88e4417e803b29/id-1.scss_3bfbc84092731480b8d374981b54d253.content} (100%) create mode 100644 resources/_gen/assets/scss/style/06219b515bd3039bce88e4417e803b29/id-1.scss_3bfbc84092731480b8d374981b54d253.json create mode 100644 resources/_gen/assets/scss/style/2d4250d7b4edf7b7647e94cfdc183b86/id-1.scss_e5494f82a408608c874431b5dcdb4f1e.content create mode 100644 resources/_gen/assets/scss/style/2d4250d7b4edf7b7647e94cfdc183b86/id-1.scss_e5494f82a408608c874431b5dcdb4f1e.json create mode 100644 resources/_gen/assets/scss/style/2f6a44c07cd36aed63db163b9f515d63/id-1.scss_4bcd2a22db7c9ce77fc96c1aa4d683bd.content create mode 100644 resources/_gen/assets/scss/style/2f6a44c07cd36aed63db163b9f515d63/id-1.scss_4bcd2a22db7c9ce77fc96c1aa4d683bd.json create mode 100644 resources/_gen/assets/scss/style/387e497be0b7dbdc903468dec88ce042/id-1.scss_66d6eb926874a089016353786f28e165.content create mode 100644 resources/_gen/assets/scss/style/387e497be0b7dbdc903468dec88ce042/id-1.scss_66d6eb926874a089016353786f28e165.json create mode 100644 resources/_gen/assets/scss/style/409594da26069e6252388311312abfd5/id-1.scss_78b750e0fe281aa9b91566ae181c2e40.content create mode 100644 resources/_gen/assets/scss/style/409594da26069e6252388311312abfd5/id-1.scss_78b750e0fe281aa9b91566ae181c2e40.json create mode 100644 resources/_gen/assets/scss/style/7857d7858fcfb859deeb60f29672cffc/id-1.scss_0d902f60eb581fec9411dd1846631db7.content create mode 100644 resources/_gen/assets/scss/style/7857d7858fcfb859deeb60f29672cffc/id-1.scss_0d902f60eb581fec9411dd1846631db7.json create mode 100644 resources/_gen/assets/scss/style/c17d91e847fcfcd8e30a3c3f56b6af46/id-1.scss_a7b5c907db9ad46c812c6b1bf9d871a7.content create mode 100644 resources/_gen/assets/scss/style/c17d91e847fcfcd8e30a3c3f56b6af46/id-1.scss_a7b5c907db9ad46c812c6b1bf9d871a7.json create mode 100644 resources/_gen/assets/scss/style/f34bb62f734d1cecaa4de6a8b8efab52/id-1.scss_da37cb970ff275a236f7c8e80f90244b.content create mode 100644 resources/_gen/assets/scss/style/f34bb62f734d1cecaa4de6a8b8efab52/id-1.scss_da37cb970ff275a236f7c8e80f90244b.json create mode 100644 resources/_gen/assets/scss/style/fb3ada7a67e15e6dfbcd8e86e0e7fb61/id-1.scss_8bcb276b6f7024fb75f6398ae3519592.content create mode 100644 resources/_gen/assets/scss/style/fb3ada7a67e15e6dfbcd8e86e0e7fb61/id-1.scss_8bcb276b6f7024fb75f6398ae3519592.json delete mode 100644 resources/_gen/assets/scss/stype/id-1.scss_ff2a8d7d59c25f259218399bceecc7ea.json diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index b08da4a..a196159 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -10,7 +10,7 @@ {{- end -}} {{- $params := .Params | merge .Site.Params.page -}} -{{- .Scratch.Set "version" "0.2.5" -}} +{{- .Scratch.Set "version" "0.2.6" -}} {{- if eq hugo.Environment "production" -}} {{- .Scratch.Set "cdn" .Site.Params.cdn -}} diff --git a/layouts/shortcodes/style.html b/layouts/shortcodes/style.html index 3e1e999..4ac5f60 100644 --- a/layouts/shortcodes/style.html +++ b/layouts/shortcodes/style.html @@ -4,7 +4,8 @@ {{- printf `<%s id="%s">%s` $tag $id $content $tag | safeHTML -}} {{- $style := .Get 0 | printf "#%s{%s}" $id -}} -{{- $res := resources.FromString (printf "stype/%s.scss" $id) $style -}} -{{- $res = $res | toCSS (dict "targetPath" (printf "stype/%s.css" $id)) -}} +{{- $path := printf "style/%s/%s" (md5 .Page.RelPermalink) $id -}} +{{- $res := resources.FromString (printf "%s.scss" $path) $style -}} +{{- $res = $res | toCSS (dict "targetPath" (printf "%s.css" $path)) -}} {{- $styleArr := (.Page.Scratch.Get "this").styleArr | default slice -}} {{- $styleArr | append $res.Content | .Page.Scratch.SetInMap "this" "styleArr" -}} diff --git a/resources/_gen/assets/scss/stype/id-1.scss_ff2a8d7d59c25f259218399bceecc7ea.content b/resources/_gen/assets/scss/style/06219b515bd3039bce88e4417e803b29/id-1.scss_3bfbc84092731480b8d374981b54d253.content similarity index 100% rename from resources/_gen/assets/scss/stype/id-1.scss_ff2a8d7d59c25f259218399bceecc7ea.content rename to resources/_gen/assets/scss/style/06219b515bd3039bce88e4417e803b29/id-1.scss_3bfbc84092731480b8d374981b54d253.content diff --git a/resources/_gen/assets/scss/style/06219b515bd3039bce88e4417e803b29/id-1.scss_3bfbc84092731480b8d374981b54d253.json b/resources/_gen/assets/scss/style/06219b515bd3039bce88e4417e803b29/id-1.scss_3bfbc84092731480b8d374981b54d253.json new file mode 100644 index 0000000..a1d0304 --- /dev/null +++ b/resources/_gen/assets/scss/style/06219b515bd3039bce88e4417e803b29/id-1.scss_3bfbc84092731480b8d374981b54d253.json @@ -0,0 +1 @@ +{"Target":"style/06219b515bd3039bce88e4417e803b29/id-1.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/style/2d4250d7b4edf7b7647e94cfdc183b86/id-1.scss_e5494f82a408608c874431b5dcdb4f1e.content b/resources/_gen/assets/scss/style/2d4250d7b4edf7b7647e94cfdc183b86/id-1.scss_e5494f82a408608c874431b5dcdb4f1e.content new file mode 100644 index 0000000..4705b8a --- /dev/null +++ b/resources/_gen/assets/scss/style/2d4250d7b4edf7b7647e94cfdc183b86/id-1.scss_e5494f82a408608c874431b5dcdb4f1e.content @@ -0,0 +1,2 @@ +#id-1 img { + height: 1.25rem; } diff --git a/resources/_gen/assets/scss/style/2d4250d7b4edf7b7647e94cfdc183b86/id-1.scss_e5494f82a408608c874431b5dcdb4f1e.json b/resources/_gen/assets/scss/style/2d4250d7b4edf7b7647e94cfdc183b86/id-1.scss_e5494f82a408608c874431b5dcdb4f1e.json new file mode 100644 index 0000000..349e487 --- /dev/null +++ b/resources/_gen/assets/scss/style/2d4250d7b4edf7b7647e94cfdc183b86/id-1.scss_e5494f82a408608c874431b5dcdb4f1e.json @@ -0,0 +1 @@ +{"Target":"style/2d4250d7b4edf7b7647e94cfdc183b86/id-1.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/style/2f6a44c07cd36aed63db163b9f515d63/id-1.scss_4bcd2a22db7c9ce77fc96c1aa4d683bd.content b/resources/_gen/assets/scss/style/2f6a44c07cd36aed63db163b9f515d63/id-1.scss_4bcd2a22db7c9ce77fc96c1aa4d683bd.content new file mode 100644 index 0000000..eeea194 --- /dev/null +++ b/resources/_gen/assets/scss/style/2f6a44c07cd36aed63db163b9f515d63/id-1.scss_4bcd2a22db7c9ce77fc96c1aa4d683bd.content @@ -0,0 +1,2 @@ +#id-1 { + text-align: right; } diff --git a/resources/_gen/assets/scss/style/2f6a44c07cd36aed63db163b9f515d63/id-1.scss_4bcd2a22db7c9ce77fc96c1aa4d683bd.json b/resources/_gen/assets/scss/style/2f6a44c07cd36aed63db163b9f515d63/id-1.scss_4bcd2a22db7c9ce77fc96c1aa4d683bd.json new file mode 100644 index 0000000..4f99983 --- /dev/null +++ b/resources/_gen/assets/scss/style/2f6a44c07cd36aed63db163b9f515d63/id-1.scss_4bcd2a22db7c9ce77fc96c1aa4d683bd.json @@ -0,0 +1 @@ +{"Target":"style/2f6a44c07cd36aed63db163b9f515d63/id-1.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/style/387e497be0b7dbdc903468dec88ce042/id-1.scss_66d6eb926874a089016353786f28e165.content b/resources/_gen/assets/scss/style/387e497be0b7dbdc903468dec88ce042/id-1.scss_66d6eb926874a089016353786f28e165.content new file mode 100644 index 0000000..eeea194 --- /dev/null +++ b/resources/_gen/assets/scss/style/387e497be0b7dbdc903468dec88ce042/id-1.scss_66d6eb926874a089016353786f28e165.content @@ -0,0 +1,2 @@ +#id-1 { + text-align: right; } diff --git a/resources/_gen/assets/scss/style/387e497be0b7dbdc903468dec88ce042/id-1.scss_66d6eb926874a089016353786f28e165.json b/resources/_gen/assets/scss/style/387e497be0b7dbdc903468dec88ce042/id-1.scss_66d6eb926874a089016353786f28e165.json new file mode 100644 index 0000000..b6df739 --- /dev/null +++ b/resources/_gen/assets/scss/style/387e497be0b7dbdc903468dec88ce042/id-1.scss_66d6eb926874a089016353786f28e165.json @@ -0,0 +1 @@ +{"Target":"style/387e497be0b7dbdc903468dec88ce042/id-1.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/style/409594da26069e6252388311312abfd5/id-1.scss_78b750e0fe281aa9b91566ae181c2e40.content b/resources/_gen/assets/scss/style/409594da26069e6252388311312abfd5/id-1.scss_78b750e0fe281aa9b91566ae181c2e40.content new file mode 100644 index 0000000..b50337c --- /dev/null +++ b/resources/_gen/assets/scss/style/409594da26069e6252388311312abfd5/id-1.scss_78b750e0fe281aa9b91566ae181c2e40.content @@ -0,0 +1,4 @@ +#id-1 { + text-align: right; } + #id-1 strong { + color: #00b1ff; } diff --git a/resources/_gen/assets/scss/style/409594da26069e6252388311312abfd5/id-1.scss_78b750e0fe281aa9b91566ae181c2e40.json b/resources/_gen/assets/scss/style/409594da26069e6252388311312abfd5/id-1.scss_78b750e0fe281aa9b91566ae181c2e40.json new file mode 100644 index 0000000..aaf81b1 --- /dev/null +++ b/resources/_gen/assets/scss/style/409594da26069e6252388311312abfd5/id-1.scss_78b750e0fe281aa9b91566ae181c2e40.json @@ -0,0 +1 @@ +{"Target":"style/409594da26069e6252388311312abfd5/id-1.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/style/7857d7858fcfb859deeb60f29672cffc/id-1.scss_0d902f60eb581fec9411dd1846631db7.content b/resources/_gen/assets/scss/style/7857d7858fcfb859deeb60f29672cffc/id-1.scss_0d902f60eb581fec9411dd1846631db7.content new file mode 100644 index 0000000..b50337c --- /dev/null +++ b/resources/_gen/assets/scss/style/7857d7858fcfb859deeb60f29672cffc/id-1.scss_0d902f60eb581fec9411dd1846631db7.content @@ -0,0 +1,4 @@ +#id-1 { + text-align: right; } + #id-1 strong { + color: #00b1ff; } diff --git a/resources/_gen/assets/scss/style/7857d7858fcfb859deeb60f29672cffc/id-1.scss_0d902f60eb581fec9411dd1846631db7.json b/resources/_gen/assets/scss/style/7857d7858fcfb859deeb60f29672cffc/id-1.scss_0d902f60eb581fec9411dd1846631db7.json new file mode 100644 index 0000000..c8a1063 --- /dev/null +++ b/resources/_gen/assets/scss/style/7857d7858fcfb859deeb60f29672cffc/id-1.scss_0d902f60eb581fec9411dd1846631db7.json @@ -0,0 +1 @@ +{"Target":"style/7857d7858fcfb859deeb60f29672cffc/id-1.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/style/c17d91e847fcfcd8e30a3c3f56b6af46/id-1.scss_a7b5c907db9ad46c812c6b1bf9d871a7.content b/resources/_gen/assets/scss/style/c17d91e847fcfcd8e30a3c3f56b6af46/id-1.scss_a7b5c907db9ad46c812c6b1bf9d871a7.content new file mode 100644 index 0000000..eeea194 --- /dev/null +++ b/resources/_gen/assets/scss/style/c17d91e847fcfcd8e30a3c3f56b6af46/id-1.scss_a7b5c907db9ad46c812c6b1bf9d871a7.content @@ -0,0 +1,2 @@ +#id-1 { + text-align: right; } diff --git a/resources/_gen/assets/scss/style/c17d91e847fcfcd8e30a3c3f56b6af46/id-1.scss_a7b5c907db9ad46c812c6b1bf9d871a7.json b/resources/_gen/assets/scss/style/c17d91e847fcfcd8e30a3c3f56b6af46/id-1.scss_a7b5c907db9ad46c812c6b1bf9d871a7.json new file mode 100644 index 0000000..43fa776 --- /dev/null +++ b/resources/_gen/assets/scss/style/c17d91e847fcfcd8e30a3c3f56b6af46/id-1.scss_a7b5c907db9ad46c812c6b1bf9d871a7.json @@ -0,0 +1 @@ +{"Target":"style/c17d91e847fcfcd8e30a3c3f56b6af46/id-1.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/style/f34bb62f734d1cecaa4de6a8b8efab52/id-1.scss_da37cb970ff275a236f7c8e80f90244b.content b/resources/_gen/assets/scss/style/f34bb62f734d1cecaa4de6a8b8efab52/id-1.scss_da37cb970ff275a236f7c8e80f90244b.content new file mode 100644 index 0000000..4705b8a --- /dev/null +++ b/resources/_gen/assets/scss/style/f34bb62f734d1cecaa4de6a8b8efab52/id-1.scss_da37cb970ff275a236f7c8e80f90244b.content @@ -0,0 +1,2 @@ +#id-1 img { + height: 1.25rem; } diff --git a/resources/_gen/assets/scss/style/f34bb62f734d1cecaa4de6a8b8efab52/id-1.scss_da37cb970ff275a236f7c8e80f90244b.json b/resources/_gen/assets/scss/style/f34bb62f734d1cecaa4de6a8b8efab52/id-1.scss_da37cb970ff275a236f7c8e80f90244b.json new file mode 100644 index 0000000..7fc699b --- /dev/null +++ b/resources/_gen/assets/scss/style/f34bb62f734d1cecaa4de6a8b8efab52/id-1.scss_da37cb970ff275a236f7c8e80f90244b.json @@ -0,0 +1 @@ +{"Target":"style/f34bb62f734d1cecaa4de6a8b8efab52/id-1.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/style/fb3ada7a67e15e6dfbcd8e86e0e7fb61/id-1.scss_8bcb276b6f7024fb75f6398ae3519592.content b/resources/_gen/assets/scss/style/fb3ada7a67e15e6dfbcd8e86e0e7fb61/id-1.scss_8bcb276b6f7024fb75f6398ae3519592.content new file mode 100644 index 0000000..b50337c --- /dev/null +++ b/resources/_gen/assets/scss/style/fb3ada7a67e15e6dfbcd8e86e0e7fb61/id-1.scss_8bcb276b6f7024fb75f6398ae3519592.content @@ -0,0 +1,4 @@ +#id-1 { + text-align: right; } + #id-1 strong { + color: #00b1ff; } diff --git a/resources/_gen/assets/scss/style/fb3ada7a67e15e6dfbcd8e86e0e7fb61/id-1.scss_8bcb276b6f7024fb75f6398ae3519592.json b/resources/_gen/assets/scss/style/fb3ada7a67e15e6dfbcd8e86e0e7fb61/id-1.scss_8bcb276b6f7024fb75f6398ae3519592.json new file mode 100644 index 0000000..6dba0aa --- /dev/null +++ b/resources/_gen/assets/scss/style/fb3ada7a67e15e6dfbcd8e86e0e7fb61/id-1.scss_8bcb276b6f7024fb75f6398ae3519592.json @@ -0,0 +1 @@ +{"Target":"style/fb3ada7a67e15e6dfbcd8e86e0e7fb61/id-1.css","MediaType":"text/css","Data":{}} \ No newline at end of file diff --git a/resources/_gen/assets/scss/stype/id-1.scss_ff2a8d7d59c25f259218399bceecc7ea.json b/resources/_gen/assets/scss/stype/id-1.scss_ff2a8d7d59c25f259218399bceecc7ea.json deleted file mode 100644 index 57e277f..0000000 --- a/resources/_gen/assets/scss/stype/id-1.scss_ff2a8d7d59c25f259218399bceecc7ea.json +++ /dev/null @@ -1 +0,0 @@ -{"Target":"stype/id-1.css","MediaType":"text/css","Data":{}} \ No newline at end of file From 2513afbd54ed5b91663915173fc0d6cbc4b9b74c Mon Sep 17 00:00:00 2001 From: Dillon Date: Wed, 6 May 2020 23:11:34 +0800 Subject: [PATCH 2/5] feat(comment): add comment for single page and emoji config for Valine (#328) --- assets/data/emoji/apple.yml | 150 ++++++++++++++++++ assets/data/emoji/facebook.yml | 150 ++++++++++++++++++ assets/data/emoji/google.yml | 150 ++++++++++++++++++ assets/data/emoji/twitter.yml | 150 ++++++++++++++++++ assets/data/{social.yaml => social.yml} | 0 exampleSite/config.toml | 7 + .../posts/theme-documentation-basics.en.md | 4 + .../posts/theme-documentation-basics.fr.md | 4 + .../posts/theme-documentation-basics.zh-cn.md | 4 + layouts/_default/single.html | 3 + layouts/partials/comment.html | 1 + layouts/partials/home/profile.html | 2 +- 12 files changed, 624 insertions(+), 1 deletion(-) create mode 100644 assets/data/emoji/apple.yml create mode 100644 assets/data/emoji/facebook.yml create mode 100644 assets/data/emoji/google.yml create mode 100644 assets/data/emoji/twitter.yml rename assets/data/{social.yaml => social.yml} (100%) diff --git a/assets/data/emoji/apple.yml b/assets/data/emoji/apple.yml new file mode 100644 index 0000000..3f9cee9 --- /dev/null +++ b/assets/data/emoji/apple.yml @@ -0,0 +1,150 @@ +emojiCDN: 'https://cdn.jsdelivr.net/npm/emoji-datasource-apple@5.0.1/img/apple/64/' +emojiMaps: + '100': 1f4af.png + grinning: 1f600.png + smiley: 1f603.png + smile: 1f604.png + grin: 1f601.png + laughing: 1f606.png + sweat_smile: 1f605.png + rolling_on_the_floor_laughing: 1f923.png + joy: 1f602.png + slightly_smiling_face: 1f642.png + upside_down_face: 1f643.png + wink: 1f609.png + blush: 1f60a.png + innocent: 1f607.png + smiling_face_with_3_hearts: 1f970.png + heart_eyes: 1f60d.png + star-struck: 1f929.png + kissing_heart: 1f618.png + kissing: 1f617.png + relaxed: 263a-fe0f.png + kissing_closed_eyes: 1f61a.png + kissing_smiling_eyes: 1f619.png + yum: 1f60b.png + stuck_out_tongue: 1f61b.png + stuck_out_tongue_winking_eye: 1f61c.png + zany_face: 1f92a.png + stuck_out_tongue_closed_eyes: 1f61d.png + money_mouth_face: 1f911.png + hugging_face: 1f917.png + face_with_hand_over_mouth: 1f92d.png + shushing_face: 1f92b.png + thinking_face: 1f914.png + zipper_mouth_face: 1f910.png + face_with_raised_eyebrow: 1f928.png + neutral_face: 1f610.png + expressionless: 1f611.png + no_mouth: 1f636.png + smirk: 1f60f.png + unamused: 1f612.png + face_with_rolling_eyes: 1f644.png + grimacing: 1f62c.png + lying_face: 1f925.png + relieved: 1f60c.png + pensive: 1f614.png + sleepy: 1f62a.png + drooling_face: 1f924.png + sleeping: 1f634.png + mask: 1f637.png + face_with_thermometer: 1f912.png + face_with_head_bandage: 1f915.png + nauseated_face: 1f922.png + face_vomiting: 1f92e.png + sneezing_face: 1f927.png + hot_face: 1f975.png + cold_face: 1f976.png + woozy_face: 1f974.png + dizzy_face: 1f635.png + exploding_head: 1f92f.png + face_with_cowboy_hat: 1f920.png + partying_face: 1f973.png + sunglasses: 1f60e.png + nerd_face: 1f913.png + face_with_monocle: 1f9d0.png + confused: 1f615.png + worried: 1f61f.png + slightly_frowning_face: 1f641.png + white_frowning_face: 2639-fe0f.png + open_mouth: 1f62e.png + hushed: 1f62f.png + astonished: 1f632.png + flushed: 1f633.png + pleading_face: 1f97a.png + frowning: 1f626.png + anguished: 1f627.png + fearful: 1f628.png + cold_sweat: 1f630.png + disappointed_relieved: 1f625.png + cry: 1f622.png + sob: 1f62d.png + scream: 1f631.png + confounded: 1f616.png + persevere: 1f623.png + disappointed: 1f61e.png + sweat: 1f613.png + weary: 1f629.png + tired_face: 1f62b.png + yawning_face: 1f971.png + triumph: 1f624.png + rage: 1f621.png + angry: 1f620.png + face_with_symbols_on_mouth: 1f92c.png + smiling_imp: 1f608.png + imp: 1f47f.png + skull: 1f480.png + skull_and_crossbones: 2620-fe0f.png + hankey: 1f4a9.png + clown_face: 1f921.png + japanese_ogre: 1f479.png + japanese_goblin: 1f47a.png + ghost: 1f47b.png + alien: 1f47d.png + space_invader: 1f47e.png + robot_face: 1f916.png + smiley_cat: 1f63a.png + smile_cat: 1f638.png + joy_cat: 1f639.png + heart_eyes_cat: 1f63b.png + smirk_cat: 1f63c.png + kissing_cat: 1f63d.png + scream_cat: 1f640.png + crying_cat_face: 1f63f.png + pouting_cat: 1f63e.png + see_no_evil: 1f648.png + hear_no_evil: 1f649.png + speak_no_evil: 1f64a.png + kiss: 1f48b.png + love_letter: 1f48c.png + cupid: 1f498.png + gift_heart: 1f49d.png + sparkling_heart: 1f496.png + heartpulse: 1f497.png + heartbeat: 1f493.png + revolving_hearts: 1f49e.png + two_hearts: 1f495.png + heart_decoration: 1f49f.png + heavy_heart_exclamation_mark_ornament: 2763-fe0f.png + broken_heart: 1f494.png + heart: 2764-fe0f.png + orange_heart: 1f9e1.png + yellow_heart: 1f49b.png + green_heart: 1f49a.png + blue_heart: 1f499.png + purple_heart: 1f49c.png + brown_heart: 1f90e.png + black_heart: 1f5a4.png + white_heart: 1f90d.png + anger: 1f4a2.png + boom: 1f4a5.png + dizzy: 1f4ab.png + sweat_drops: 1f4a6.png + dash: 1f4a8.png + hole: 1f573-fe0f.png + bomb: 1f4a3.png + speech_balloon: 1f4ac.png + left_speech_bubble: 1f5e8-fe0f.png + right_anger_bubble: 1f5ef-fe0f.png + thought_balloon: 1f4ad.png + zzz: 1f4a4.png diff --git a/assets/data/emoji/facebook.yml b/assets/data/emoji/facebook.yml new file mode 100644 index 0000000..f987491 --- /dev/null +++ b/assets/data/emoji/facebook.yml @@ -0,0 +1,150 @@ +emojiCDN: 'https://cdn.jsdelivr.net/npm/emoji-datasource-facebook@5.0.1/img/facebook/64/' +emojiMaps: + '100': 1f4af.png + grinning: 1f600.png + smiley: 1f603.png + smile: 1f604.png + grin: 1f601.png + laughing: 1f606.png + sweat_smile: 1f605.png + rolling_on_the_floor_laughing: 1f923.png + joy: 1f602.png + slightly_smiling_face: 1f642.png + upside_down_face: 1f643.png + wink: 1f609.png + blush: 1f60a.png + innocent: 1f607.png + smiling_face_with_3_hearts: 1f970.png + heart_eyes: 1f60d.png + star-struck: 1f929.png + kissing_heart: 1f618.png + kissing: 1f617.png + relaxed: 263a-fe0f.png + kissing_closed_eyes: 1f61a.png + kissing_smiling_eyes: 1f619.png + yum: 1f60b.png + stuck_out_tongue: 1f61b.png + stuck_out_tongue_winking_eye: 1f61c.png + zany_face: 1f92a.png + stuck_out_tongue_closed_eyes: 1f61d.png + money_mouth_face: 1f911.png + hugging_face: 1f917.png + face_with_hand_over_mouth: 1f92d.png + shushing_face: 1f92b.png + thinking_face: 1f914.png + zipper_mouth_face: 1f910.png + face_with_raised_eyebrow: 1f928.png + neutral_face: 1f610.png + expressionless: 1f611.png + no_mouth: 1f636.png + smirk: 1f60f.png + unamused: 1f612.png + face_with_rolling_eyes: 1f644.png + grimacing: 1f62c.png + lying_face: 1f925.png + relieved: 1f60c.png + pensive: 1f614.png + sleepy: 1f62a.png + drooling_face: 1f924.png + sleeping: 1f634.png + mask: 1f637.png + face_with_thermometer: 1f912.png + face_with_head_bandage: 1f915.png + nauseated_face: 1f922.png + face_vomiting: 1f92e.png + sneezing_face: 1f927.png + hot_face: 1f975.png + cold_face: 1f976.png + woozy_face: 1f974.png + dizzy_face: 1f635.png + exploding_head: 1f92f.png + face_with_cowboy_hat: 1f920.png + partying_face: 1f973.png + sunglasses: 1f60e.png + nerd_face: 1f913.png + face_with_monocle: 1f9d0.png + confused: 1f615.png + worried: 1f61f.png + slightly_frowning_face: 1f641.png + white_frowning_face: 2639-fe0f.png + open_mouth: 1f62e.png + hushed: 1f62f.png + astonished: 1f632.png + flushed: 1f633.png + pleading_face: 1f97a.png + frowning: 1f626.png + anguished: 1f627.png + fearful: 1f628.png + cold_sweat: 1f630.png + disappointed_relieved: 1f625.png + cry: 1f622.png + sob: 1f62d.png + scream: 1f631.png + confounded: 1f616.png + persevere: 1f623.png + disappointed: 1f61e.png + sweat: 1f613.png + weary: 1f629.png + tired_face: 1f62b.png + yawning_face: 1f971.png + triumph: 1f624.png + rage: 1f621.png + angry: 1f620.png + face_with_symbols_on_mouth: 1f92c.png + smiling_imp: 1f608.png + imp: 1f47f.png + skull: 1f480.png + skull_and_crossbones: 2620-fe0f.png + hankey: 1f4a9.png + clown_face: 1f921.png + japanese_ogre: 1f479.png + japanese_goblin: 1f47a.png + ghost: 1f47b.png + alien: 1f47d.png + space_invader: 1f47e.png + robot_face: 1f916.png + smiley_cat: 1f63a.png + smile_cat: 1f638.png + joy_cat: 1f639.png + heart_eyes_cat: 1f63b.png + smirk_cat: 1f63c.png + kissing_cat: 1f63d.png + scream_cat: 1f640.png + crying_cat_face: 1f63f.png + pouting_cat: 1f63e.png + see_no_evil: 1f648.png + hear_no_evil: 1f649.png + speak_no_evil: 1f64a.png + kiss: 1f48b.png + love_letter: 1f48c.png + cupid: 1f498.png + gift_heart: 1f49d.png + sparkling_heart: 1f496.png + heartpulse: 1f497.png + heartbeat: 1f493.png + revolving_hearts: 1f49e.png + two_hearts: 1f495.png + heart_decoration: 1f49f.png + heavy_heart_exclamation_mark_ornament: 2763-fe0f.png + broken_heart: 1f494.png + heart: 2764-fe0f.png + orange_heart: 1f9e1.png + yellow_heart: 1f49b.png + green_heart: 1f49a.png + blue_heart: 1f499.png + purple_heart: 1f49c.png + brown_heart: 1f90e.png + black_heart: 1f5a4.png + white_heart: 1f90d.png + anger: 1f4a2.png + boom: 1f4a5.png + dizzy: 1f4ab.png + sweat_drops: 1f4a6.png + dash: 1f4a8.png + hole: 1f573-fe0f.png + bomb: 1f4a3.png + speech_balloon: 1f4ac.png + left_speech_bubble: 1f5e8-fe0f.png + right_anger_bubble: 1f5ef-fe0f.png + thought_balloon: 1f4ad.png + zzz: 1f4a4.png diff --git a/assets/data/emoji/google.yml b/assets/data/emoji/google.yml new file mode 100644 index 0000000..7137ccb --- /dev/null +++ b/assets/data/emoji/google.yml @@ -0,0 +1,150 @@ +emojiCDN: 'https://cdn.jsdelivr.net/npm/emoji-datasource-google@5.0.1/img/google/64/' +emojiMaps: + '100': 1f4af.png + grinning: 1f600.png + smiley: 1f603.png + smile: 1f604.png + grin: 1f601.png + laughing: 1f606.png + sweat_smile: 1f605.png + rolling_on_the_floor_laughing: 1f923.png + joy: 1f602.png + slightly_smiling_face: 1f642.png + upside_down_face: 1f643.png + wink: 1f609.png + blush: 1f60a.png + innocent: 1f607.png + smiling_face_with_3_hearts: 1f970.png + heart_eyes: 1f60d.png + star-struck: 1f929.png + kissing_heart: 1f618.png + kissing: 1f617.png + relaxed: 263a-fe0f.png + kissing_closed_eyes: 1f61a.png + kissing_smiling_eyes: 1f619.png + yum: 1f60b.png + stuck_out_tongue: 1f61b.png + stuck_out_tongue_winking_eye: 1f61c.png + zany_face: 1f92a.png + stuck_out_tongue_closed_eyes: 1f61d.png + money_mouth_face: 1f911.png + hugging_face: 1f917.png + face_with_hand_over_mouth: 1f92d.png + shushing_face: 1f92b.png + thinking_face: 1f914.png + zipper_mouth_face: 1f910.png + face_with_raised_eyebrow: 1f928.png + neutral_face: 1f610.png + expressionless: 1f611.png + no_mouth: 1f636.png + smirk: 1f60f.png + unamused: 1f612.png + face_with_rolling_eyes: 1f644.png + grimacing: 1f62c.png + lying_face: 1f925.png + relieved: 1f60c.png + pensive: 1f614.png + sleepy: 1f62a.png + drooling_face: 1f924.png + sleeping: 1f634.png + mask: 1f637.png + face_with_thermometer: 1f912.png + face_with_head_bandage: 1f915.png + nauseated_face: 1f922.png + face_vomiting: 1f92e.png + sneezing_face: 1f927.png + hot_face: 1f975.png + cold_face: 1f976.png + woozy_face: 1f974.png + dizzy_face: 1f635.png + exploding_head: 1f92f.png + face_with_cowboy_hat: 1f920.png + partying_face: 1f973.png + sunglasses: 1f60e.png + nerd_face: 1f913.png + face_with_monocle: 1f9d0.png + confused: 1f615.png + worried: 1f61f.png + slightly_frowning_face: 1f641.png + white_frowning_face: 2639-fe0f.png + open_mouth: 1f62e.png + hushed: 1f62f.png + astonished: 1f632.png + flushed: 1f633.png + pleading_face: 1f97a.png + frowning: 1f626.png + anguished: 1f627.png + fearful: 1f628.png + cold_sweat: 1f630.png + disappointed_relieved: 1f625.png + cry: 1f622.png + sob: 1f62d.png + scream: 1f631.png + confounded: 1f616.png + persevere: 1f623.png + disappointed: 1f61e.png + sweat: 1f613.png + weary: 1f629.png + tired_face: 1f62b.png + yawning_face: 1f971.png + triumph: 1f624.png + rage: 1f621.png + angry: 1f620.png + face_with_symbols_on_mouth: 1f92c.png + smiling_imp: 1f608.png + imp: 1f47f.png + skull: 1f480.png + skull_and_crossbones: 2620-fe0f.png + hankey: 1f4a9.png + clown_face: 1f921.png + japanese_ogre: 1f479.png + japanese_goblin: 1f47a.png + ghost: 1f47b.png + alien: 1f47d.png + space_invader: 1f47e.png + robot_face: 1f916.png + smiley_cat: 1f63a.png + smile_cat: 1f638.png + joy_cat: 1f639.png + heart_eyes_cat: 1f63b.png + smirk_cat: 1f63c.png + kissing_cat: 1f63d.png + scream_cat: 1f640.png + crying_cat_face: 1f63f.png + pouting_cat: 1f63e.png + see_no_evil: 1f648.png + hear_no_evil: 1f649.png + speak_no_evil: 1f64a.png + kiss: 1f48b.png + love_letter: 1f48c.png + cupid: 1f498.png + gift_heart: 1f49d.png + sparkling_heart: 1f496.png + heartpulse: 1f497.png + heartbeat: 1f493.png + revolving_hearts: 1f49e.png + two_hearts: 1f495.png + heart_decoration: 1f49f.png + heavy_heart_exclamation_mark_ornament: 2763-fe0f.png + broken_heart: 1f494.png + heart: 2764-fe0f.png + orange_heart: 1f9e1.png + yellow_heart: 1f49b.png + green_heart: 1f49a.png + blue_heart: 1f499.png + purple_heart: 1f49c.png + brown_heart: 1f90e.png + black_heart: 1f5a4.png + white_heart: 1f90d.png + anger: 1f4a2.png + boom: 1f4a5.png + dizzy: 1f4ab.png + sweat_drops: 1f4a6.png + dash: 1f4a8.png + hole: 1f573-fe0f.png + bomb: 1f4a3.png + speech_balloon: 1f4ac.png + left_speech_bubble: 1f5e8-fe0f.png + right_anger_bubble: 1f5ef-fe0f.png + thought_balloon: 1f4ad.png + zzz: 1f4a4.png diff --git a/assets/data/emoji/twitter.yml b/assets/data/emoji/twitter.yml new file mode 100644 index 0000000..97365c6 --- /dev/null +++ b/assets/data/emoji/twitter.yml @@ -0,0 +1,150 @@ +emojiCDN: 'https://cdn.jsdelivr.net/npm/emoji-datasource-twitter@5.0.1/img/twitter/64/' +emojiMaps: + '100': 1f4af.png + grinning: 1f600.png + smiley: 1f603.png + smile: 1f604.png + grin: 1f601.png + laughing: 1f606.png + sweat_smile: 1f605.png + rolling_on_the_floor_laughing: 1f923.png + joy: 1f602.png + slightly_smiling_face: 1f642.png + upside_down_face: 1f643.png + wink: 1f609.png + blush: 1f60a.png + innocent: 1f607.png + smiling_face_with_3_hearts: 1f970.png + heart_eyes: 1f60d.png + star-struck: 1f929.png + kissing_heart: 1f618.png + kissing: 1f617.png + relaxed: 263a-fe0f.png + kissing_closed_eyes: 1f61a.png + kissing_smiling_eyes: 1f619.png + yum: 1f60b.png + stuck_out_tongue: 1f61b.png + stuck_out_tongue_winking_eye: 1f61c.png + zany_face: 1f92a.png + stuck_out_tongue_closed_eyes: 1f61d.png + money_mouth_face: 1f911.png + hugging_face: 1f917.png + face_with_hand_over_mouth: 1f92d.png + shushing_face: 1f92b.png + thinking_face: 1f914.png + zipper_mouth_face: 1f910.png + face_with_raised_eyebrow: 1f928.png + neutral_face: 1f610.png + expressionless: 1f611.png + no_mouth: 1f636.png + smirk: 1f60f.png + unamused: 1f612.png + face_with_rolling_eyes: 1f644.png + grimacing: 1f62c.png + lying_face: 1f925.png + relieved: 1f60c.png + pensive: 1f614.png + sleepy: 1f62a.png + drooling_face: 1f924.png + sleeping: 1f634.png + mask: 1f637.png + face_with_thermometer: 1f912.png + face_with_head_bandage: 1f915.png + nauseated_face: 1f922.png + face_vomiting: 1f92e.png + sneezing_face: 1f927.png + hot_face: 1f975.png + cold_face: 1f976.png + woozy_face: 1f974.png + dizzy_face: 1f635.png + exploding_head: 1f92f.png + face_with_cowboy_hat: 1f920.png + partying_face: 1f973.png + sunglasses: 1f60e.png + nerd_face: 1f913.png + face_with_monocle: 1f9d0.png + confused: 1f615.png + worried: 1f61f.png + slightly_frowning_face: 1f641.png + white_frowning_face: 2639-fe0f.png + open_mouth: 1f62e.png + hushed: 1f62f.png + astonished: 1f632.png + flushed: 1f633.png + pleading_face: 1f97a.png + frowning: 1f626.png + anguished: 1f627.png + fearful: 1f628.png + cold_sweat: 1f630.png + disappointed_relieved: 1f625.png + cry: 1f622.png + sob: 1f62d.png + scream: 1f631.png + confounded: 1f616.png + persevere: 1f623.png + disappointed: 1f61e.png + sweat: 1f613.png + weary: 1f629.png + tired_face: 1f62b.png + yawning_face: 1f971.png + triumph: 1f624.png + rage: 1f621.png + angry: 1f620.png + face_with_symbols_on_mouth: 1f92c.png + smiling_imp: 1f608.png + imp: 1f47f.png + skull: 1f480.png + skull_and_crossbones: 2620-fe0f.png + hankey: 1f4a9.png + clown_face: 1f921.png + japanese_ogre: 1f479.png + japanese_goblin: 1f47a.png + ghost: 1f47b.png + alien: 1f47d.png + space_invader: 1f47e.png + robot_face: 1f916.png + smiley_cat: 1f63a.png + smile_cat: 1f638.png + joy_cat: 1f639.png + heart_eyes_cat: 1f63b.png + smirk_cat: 1f63c.png + kissing_cat: 1f63d.png + scream_cat: 1f640.png + crying_cat_face: 1f63f.png + pouting_cat: 1f63e.png + see_no_evil: 1f648.png + hear_no_evil: 1f649.png + speak_no_evil: 1f64a.png + kiss: 1f48b.png + love_letter: 1f48c.png + cupid: 1f498.png + gift_heart: 1f49d.png + sparkling_heart: 1f496.png + heartpulse: 1f497.png + heartbeat: 1f493.png + revolving_hearts: 1f49e.png + two_hearts: 1f495.png + heart_decoration: 1f49f.png + heavy_heart_exclamation_mark_ornament: 2763-fe0f.png + broken_heart: 1f494.png + heart: 2764-fe0f.png + orange_heart: 1f9e1.png + yellow_heart: 1f49b.png + green_heart: 1f49a.png + blue_heart: 1f499.png + purple_heart: 1f49c.png + brown_heart: 1f90e.png + black_heart: 1f5a4.png + white_heart: 1f90d.png + anger: 1f4a2.png + boom: 1f4a5.png + dizzy: 1f4ab.png + sweat_drops: 1f4a6.png + dash: 1f4a8.png + hole: 1f573-fe0f.png + bomb: 1f4a3.png + speech_balloon: 1f4ac.png + left_speech_bubble: 1f5e8-fe0f.png + right_anger_bubble: 1f5ef-fe0f.png + thought_balloon: 1f4ad.png + zzz: 1f4a4.png diff --git a/assets/data/social.yaml b/assets/data/social.yml similarity index 100% rename from assets/data/social.yaml rename to assets/data/social.yml diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 480d05f..15d5e02 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -873,6 +873,13 @@ enableEmoji = true highlight = true enableQQ = false serverURLs = "" + # emoji config file name, default is "google.yml" + # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") + # located in "assets/data/emoji/" directory, where you can put your config file + # emoji 配置文件名称, 默认是 "facebook.yml" + # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") + # 位于 "assets/data/emoji/" 目录, 你可以在此存放你自己的配置文件 + emoji = "" # Facebook comment config (https://developers.facebook.com/docs/plugins/comments) # Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments) [params.page.comment.facebook] diff --git a/exampleSite/content/posts/theme-documentation-basics.en.md b/exampleSite/content/posts/theme-documentation-basics.en.md index eeaf8fc..cb4d770 100644 --- a/exampleSite/content/posts/theme-documentation-basics.en.md +++ b/exampleSite/content/posts/theme-documentation-basics.en.md @@ -513,6 +513,10 @@ Please open the code block below to view the complete sample configuration :(far highlight = true enableQQ = false serverURLs = "" + # {{< version 0.2.6 >}} emoji config file name, default is "facebook.yml" + # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") + # located in "assets/data/emoji/" directory, where you can put your config file + emoji = "" # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook comment" >}} config [params.page.comment.facebook] enable = false diff --git a/exampleSite/content/posts/theme-documentation-basics.fr.md b/exampleSite/content/posts/theme-documentation-basics.fr.md index 255b2e6..72f0157 100644 --- a/exampleSite/content/posts/theme-documentation-basics.fr.md +++ b/exampleSite/content/posts/theme-documentation-basics.fr.md @@ -518,6 +518,10 @@ Please open the code block below to view the complete sample configuration :(far highlight = true enableQQ = false serverURLs = "" + # {{< version 0.2.6 >}} emoji config file name, default is "facebook.yml" + # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") + # located in "assets/data/emoji/" directory, where you can put your config file + emoji = "" # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook comment" >}} config [params.page.comment.facebook] enable = false diff --git a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md index 41ad1f3..e610bff 100644 --- a/exampleSite/content/posts/theme-documentation-basics.zh-cn.md +++ b/exampleSite/content/posts/theme-documentation-basics.zh-cn.md @@ -520,6 +520,10 @@ hugo highlight = true enableQQ = false serverURLs = "" + # {{< version 0.2.6 >}} emoji 配置文件名称, 默认是 "facebook.yml" + # ("apple.yml", "google.yml", "facebook.yml", "twitter.yml") + # 位于 "assets/data/emoji/" 目录, 你可以在此存放你自己的配置文件 + emoji = "" # {{< link "https://developers.facebook.com/docs/plugins/comments" "Facebook 评论系统" >}}设置 [params.page.comment.facebook] enable = false diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 9f23ce8..c14337b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -17,5 +17,8 @@
{{- dict "content" .Content "ruby" $params.ruby "fraction" $params.fraction "fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
+ + {{- /* Comment */ -}} + {{- partial "comment.html" . -}} {{- end -}} diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html index fac888e..71ea677 100644 --- a/layouts/partials/comment.html +++ b/layouts/partials/comment.html @@ -50,6 +50,7 @@ {{- with $valine.serverURLs -}} {{- $commentConfig = dict "serverURLs" . | dict "valine" | merge $commentConfig -}} {{- end -}} + {{- $commentConfig = $valine.emoji | default "facebook.yml" | printf "data/emoji/%s" | resources.Get | transform.Unmarshal | dict "valine" | merge $commentConfig -}} diff --git a/layouts/partials/home/profile.html b/layouts/partials/home/profile.html index 427ba8c..4563e19 100644 --- a/layouts/partials/home/profile.html +++ b/layouts/partials/home/profile.html @@ -41,7 +41,7 @@ {{- if $profile.social -}}