Skip to content

Commit 8c9112d

Browse files
committed
from plugin folder
1 parent fe716bd commit 8c9112d

File tree

3 files changed

+59
-82
lines changed

3 files changed

+59
-82
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 François VIDIT
3+
Copyright (c) 2021 Fran�ois VIDIT
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+29-81
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,56 @@
1-
# Grav Markdown RubyText Plugin
1+
# Markdown Rubytext Plugin
22

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.**
44

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.
66

7-
This plugin is easy to install with GPM.
7+
## Installation
88

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.
2210

23-
## simple and serial ruby
11+
### GPM Installation (Preferred)
2412

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:
2614

27-
```
28-
This is {r}日(に)本(ほん)語(ご){/r}
29-
and this is {r}漢(ㄏㄢˋ){/r}.
30-
```
15+
bin/gpm install markdown-rubytext
3116

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`.
3318

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
3820

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).
4022

41-
![this-is-nihongo-and-this-is-kan](markdown-rubytext3-0-0.png)
23+
You should now have all the plugin files under
4224

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).
4428
45-
In your markdown file, it is now also possible to set __lang attributes__ like:
29+
### Admin Plugin
4630

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.
4932

50-
this is {r=ja/fr}ピエル(Pierre)・()グリマル(GRIMAL){/r},
33+
## Configuration
5134

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.
5336

54-
this is {r}漢(ㄏㄢˋ){/r},
37+
Here is the default configuration and an explanation of available options:
5538

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
7141
```
7242
73-
Standart display:
74-
75-
![this-is-nihongo-and-this-is-kan](markdown-rubytext3-0-0_2.png)
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.
8344

84-
__Important note__:
45+
## Usage
8546

86-
To be valid, each lang attribute has to be of __2 *or* 3 letters maximum__.
47+
**Describe how to use the plugin.**
8748

88-
# Future goal (difficult, please contribute)
49+
## Credits
8950

90-
## add possibility to enabled from page
51+
**Did you incorporate third-party code? Want to thank somebody?**
9152

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
10554

106-
Would activate the plugin.
55+
- [ ] Future plans, if any
10756

108-
A example can be found with the `shortcode-core` plugin [here](https://github.com/getgrav/grav-plugin-shortcode-core).

composer.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "tidiview/markdown-rubytext",
3+
"type": "grav-plugin",
4+
"description": "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.",
5+
"keywords": ["plugin", "grav"],
6+
"homepage": "https://github.com/tidiview/grav-plugin-markdown-rubytext",
7+
"license": "MIT",
8+
"authors": [
9+
{
10+
"name": "Francois VIDIT",
11+
"email": "[email protected]",
12+
"role": "Developer"
13+
}
14+
],
15+
"require": {
16+
"php": ">=7.1.3"
17+
},
18+
"autoload": {
19+
"psr-4": {
20+
"Grav\\Plugin\\MarkdownRubytext\\": "classes/"
21+
},
22+
"classmap": ["markdown-rubytext.php"]
23+
},
24+
"config": {
25+
"platform": {
26+
"php": "7.1.3"
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)