|
1 |
| -# Grav Markdown RubyText Plugin |
| 1 | +# Markdown Rubytext Plugin |
2 | 2 |
|
3 |
| -The **markdown-rubytext plugin** for [Grav](http://github.com/getgrav/grav) allows you to add output <ruby> tagged text in Markdown: |
| 3 | +**This README.md file should be modified to describe the features, installation, configuration, and general usage of the plugin.** |
4 | 4 |
|
5 |
| -# Installation |
| 5 | +The **Markdown Rubytext** Plugin is an extension for [Grav CMS](http://github.com/getgrav/grav). Adds ability to output <ruby> HTML tag text with a shortcode in Markdown. Pratical for extreme oriental laguages like japanese or chinese as to annotate pronunciation of ideograms. |
6 | 6 |
|
7 |
| -This plugin is easy to install with GPM. |
| 7 | +## Installation |
8 | 8 |
|
9 |
| -``` |
10 |
| -$ bin/gpm install markdown-rubytext |
11 |
| -``` |
12 |
| - |
13 |
| -# Configuration |
14 |
| - |
15 |
| -Simply copy the `user/plugins/markdown-color/markdown-rubytext.yaml` into `user/config/plugins/markdown-rubytext.yaml` and make your modifications. |
16 |
| - |
17 |
| -``` |
18 |
| -enabled: true |
19 |
| -``` |
20 |
| - |
21 |
| -# Usage |
| 9 | +Installing the Markdown Rubytext plugin can be done in one of three ways: The GPM (Grav Package Manager) installation method lets you quickly install the plugin with a simple terminal command, the manual method lets you do so via a zip file, and the admin method lets you do so via the Admin Plugin. |
22 | 10 |
|
23 |
| -## simple and serial ruby |
| 11 | +### GPM Installation (Preferred) |
24 | 12 |
|
25 |
| -In your markdown file, __thoses shortcodes__: |
| 13 | +To install the plugin via the [GPM](http://learn.getgrav.org/advanced/grav-gpm), through your system's terminal (also called the command line), navigate to the root of your Grav-installation, and enter: |
26 | 14 |
|
27 |
| -``` |
28 |
| -This is {r}日(に)本(ほん)語(ご){/r} |
29 |
| -and this is {r}漢(ㄏㄢˋ){/r}. |
30 |
| -``` |
| 15 | + bin/gpm install markdown-rubytext |
31 | 16 |
|
32 |
| -Will produce the __following HTML__: |
| 17 | +This will install the Markdown Rubytext plugin into your `/user/plugins`-directory within Grav. Its files can be found under `/your/site/grav/user/plugins/markdown-rubytext`. |
33 | 18 |
|
34 |
| -``` |
35 |
| -This is <ruby>日<rp>(</rp><rt>に</rt><rp>)</rp>本<rp>(</rp><rt>ほん</rt><rp>)</rp>語<rp>(</rp><rt>ご</rt><rp>)</rp></ruby> |
36 |
| -and this is <ruby>漢<rp>(</rp><rt>ㄏㄢˋ</rt><rp>)</rp></ruby>. |
37 |
| -``` |
| 19 | +### Manual Installation |
38 | 20 |
|
39 |
| -Standart display: |
| 21 | +To install the plugin manually, download the zip-version of this repository and unzip it under `/your/site/grav/user/plugins`. Then rename the folder to `markdown-rubytext`. You can find these files on [GitHub](https://github.com/tidiview/grav-plugin-markdown-rubytext) or via [GetGrav.org](http://getgrav.org/downloads/plugins#extras). |
40 | 22 |
|
41 |
| - |
| 23 | +You should now have all the plugin files under |
42 | 24 |
|
43 |
| -## new option (from v3.0.0): possiblity add a lang attributes |
| 25 | + /your/site/grav/user/plugins/markdown-rubytext |
| 26 | + |
| 27 | +> NOTE: This plugin is a modular component for Grav which may require other plugins to operate, please see its [blueprints.yaml-file on GitHub](https://github.com/tidiview/grav-plugin-markdown-rubytext/blob/master/blueprints.yaml). |
44 | 28 |
|
45 |
| -In your markdown file, it is now also possible to set __lang attributes__ like: |
| 29 | +### Admin Plugin |
46 | 30 |
|
47 |
| -``` |
48 |
| -This is {r=ja/ar}メダウルッシュ(مداوروش){/r}, |
| 31 | +If you use the Admin Plugin, you can install the plugin directly by browsing the `Plugins`-menu and clicking on the `Add` button. |
49 | 32 |
|
50 |
| -this is {r=ja/fr}ピエル(Pierre)・()グリマル(GRIMAL){/r}, |
| 33 | +## Configuration |
51 | 34 |
|
52 |
| -this is {r=ja/grc}トロイア(Τρωάς){/r}, |
| 35 | +Before configuring this plugin, you should copy the `user/plugins/markdown-rubytext/markdown-rubytext.yaml` to `user/config/plugins/markdown-rubytext.yaml` and only edit that copy. |
53 | 36 |
|
54 |
| -this is {r}漢(ㄏㄢˋ){/r}, |
| 37 | +Here is the default configuration and an explanation of available options: |
55 | 38 |
|
56 |
| -and this is {r=ja/ber}アマーズィーグ(ⴰⵎⴰⵣⵉⵖ){/r}族. |
57 |
| -``` |
58 |
| - |
59 |
| -Will produce the following HTML, nested by a __single `ruby` HTML tag__: |
60 |
| - |
61 |
| -``` |
62 |
| -This is <ruby lang="ja">メダウルッシュ<rp>(</rp><rt lang="ar">مداوروش</rt><rp>)</rp></ruby>, |
63 |
| -
|
64 |
| -this is <ruby lang="ja">ピエル<rp>(</rp><rt lang="fr">Pierre</rt><rp>)</rp>・<rp>(</rp><rt lang="fr"></rt><rp>)</rp><rb>グリマル<rp>(</rp><rt lang="fr">GRIMAL</rt><rp>)</rp></ruby>, |
65 |
| -
|
66 |
| -this is <ruby lang="ja">トロイア<rp>(</rp><rt lang="grc">Τρωάς</rt><rp>)</rp></ruby>, |
67 |
| -
|
68 |
| -this is <ruby>漢<rp>(</rp><rt>ㄏㄢˋ</rt><rp>)</rp></ruby>, |
69 |
| -
|
70 |
| -and this is <ruby lang="ja">アマーズィーグ<rp>(</rp><rt lang="ber">ⴰⵎⴰⵣⵉⵖ</rt><rp>)</rp></ruby>. |
| 39 | +```yaml |
| 40 | +enabled: true |
71 | 41 | ```
|
72 | 42 |
|
73 |
| -Standart display: |
74 |
| - |
75 |
| - |
76 |
| - |
77 |
| -__to be valid HTML, lang attributes has to be part of__: |
78 |
| -1. [ISO 639-1 Language Codes List](https://www.w3schools.com/TAgs/ref_language_codes.asp), |
79 |
| - |
80 |
| -OR |
81 |
| - |
82 |
| -2. [ISO 639-2 Language Codes List](https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes) |
| 43 | +Note that if you use the Admin Plugin, a file with your configuration named markdown-rubytext.yaml will be saved in the `user/config/plugins/`-folder once the configuration is saved in the Admin. |
83 | 44 |
|
84 |
| -__Important note__: |
| 45 | +## Usage |
85 | 46 |
|
86 |
| -To be valid, each lang attribute has to be of __2 *or* 3 letters maximum__. |
| 47 | +**Describe how to use the plugin.** |
87 | 48 |
|
88 |
| -# Future goal (difficult, please contribute) |
| 49 | +## Credits |
89 | 50 |
|
90 |
| -## add possibility to enabled from page |
| 51 | +**Did you incorporate third-party code? Want to thank somebody?** |
91 | 52 |
|
92 |
| -In your `config` file: |
93 |
| - |
94 |
| -``` |
95 |
| -enabled: true |
96 |
| -active: false |
97 |
| -``` |
98 |
| - |
99 |
| -In your markdown file: |
100 |
| - |
101 |
| -``` |
102 |
| -markdown-rubytext: |
103 |
| - active: true |
104 |
| -``` |
| 53 | +## To Do |
105 | 54 |
|
106 |
| -Would activate the plugin. |
| 55 | +- [ ] Future plans, if any |
107 | 56 |
|
108 |
| -A example can be found with the `shortcode-core` plugin [here](https://github.com/getgrav/grav-plugin-shortcode-core). |
0 commit comments