Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/qqhann/hugo-primer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQiushi Pan <17402261+qqhann@users.noreply.github.com>2019-05-21 19:41:49 +0300
committerGitHub <noreply@github.com>2019-05-21 19:41:49 +0300
commit83b8097cb4ddddeb6ad79609ce7b5d428e472faa (patch)
tree552ecbbd0503f555b394929585fe6ceb2db6c9cd
parent70e05feabcb4976501c893ca4232af7c9f67db04 (diff)
parent1feba8671395d0a8153f948032252c44f6c8b266 (diff)
Merge pull request #29 from keaising/master
Add support for ruby annotation
-rw-r--r--README.md14
-rw-r--r--images/ruby.pngbin0 -> 7229 bytes
-rw-r--r--layouts/shortcodes/ruby.html3
3 files changed, 17 insertions, 0 deletions
diff --git a/README.md b/README.md
index e5314e6..4455fbc 100644
--- a/README.md
+++ b/README.md
@@ -109,6 +109,20 @@ tags:
```
Set keywords for seo.
+#### ruby annotation
+
+[ruby annotation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby) allows you to show pronunciation of characters. Ruby in hugo-primer is like this:
+
+![ruby](/images/ruby.png)
+
+You just need one line shortcodes code:
+
+```
+{{< ruby rb="深表遗憾" rt="Xi Wen Le Jian" >}}
+
+{{< ruby rb="My heart is broken." rt="I'm happy for that." >}}
+```
+
## Contributing
Issues and PRs are welcome. :)
diff --git a/images/ruby.png b/images/ruby.png
new file mode 100644
index 0000000..e3b3656
--- /dev/null
+++ b/images/ruby.png
Binary files differ
diff --git a/layouts/shortcodes/ruby.html b/layouts/shortcodes/ruby.html
new file mode 100644
index 0000000..408935b
--- /dev/null
+++ b/layouts/shortcodes/ruby.html
@@ -0,0 +1,3 @@
+<ruby>
+ {{ .Get "rb" }} <rp> (</rp><rt>{{ .Get "rt" }}</rt><rp>) </rp>
+</ruby>