Skip to content

Commit 9d44ea7

Browse files
committed
refs #13 add directive sample code
1 parent 4b86151 commit 9d44ea7

File tree

7 files changed

+30
-6
lines changed

7 files changed

+30
-6
lines changed

docs/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ extensions = [
3636
]
3737
```
3838

39-
### 3. Use `nekochan` role {nekochan}`clap-nya`
39+
### 3. Use `nekochan` role or directive {nekochan}`clap-nya`
4040

41-
When you use the `nekochan` roll, you will see any Nekochan emoji.
41+
When you use the `nekochan` roll or directive, you will see any Nekochan emoji.
4242

4343
````{tab-set-code}
4444
```{literalinclude} ./snippets/simple.md
4545
:language: markdown
4646
```
47+
4748
```{literalinclude} ./snippets/simple.rst
4849
:language: rst
4950
```
@@ -55,14 +56,14 @@ When you use the `nekochan` roll, you will see any Nekochan emoji.
5556
```{include} ./snippets/simple.md
5657
```
5758

58-
5959
### 4. Customize emoji height and alt text {nekochan}`memo-nya`
6060

6161
You can specify height and alt text with a semicolon(`;`) after the name of the `nekochan` role.
6262

6363
````{tab-set-code}
6464
```{literalinclude} ./snippets/with-height-alt.md
6565
:language: markdown
66+
6667
```
6768
```{literalinclude} ./snippets/with-height-alt.rst
6869
:language: rst

docs/snippets/simple.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ Welcome to Nekochan emoji {nekochan}`banzai` world!!
22

33
* Enjoy Nekochan emoji {nekochan}`ok`
44
* I love {nekochan}`beer`
5+
6+
```{nekochan} melty
7+
```

docs/snippets/simple.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
Welcome to Nekochan emoji {nekochan}`banzai` world!!
1+
Welcome to Nekochan emoji :nekochan:`banzai` world!!
22

3-
* Enjoy Nekochan emoji {nekochan}`ok`
4-
* I love {nekochan}`beer`
3+
* Enjoy Nekochan emoji :nekochan:`ok`
4+
* I love :nekochan:`beer`
5+
6+
.. nekochan:: melty

docs/snippets/with-height-alt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
* Big bear nekochan {nekochan}`kuma-nya;2em`
22
* Huge hot-sprint nekochan {nekochan}`hot-spring;128px`
33
* Customize alt text for emoji {nekochan}`gohan-taberu;3em;Nekochan eating rice ball`
4+
5+
```{nekochan} lgtm
6+
:alt: Looks Good To Me
7+
:height: 3em
8+
```

docs/snippets/with-height-alt.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
* Big bear nekochan :nekochan:`kuma-nya;2em`
22
* Huge hot-sprint nekochan :nekochan:`hot-spring;128px`
33
* Customize alt text for emoji :nekochan:`gohan-taberu;3em;Nekochan eating rice ball`
4+
5+
.. nekochan:: lgtm
6+
:alt: Looks Good To Me
7+
:height: 3em

docs/snippets/with-transform.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
* Skip {nekochan}`skip-nya;2em` rotated 90 degrees clockwise {nekochan}`skip-nya;2em;;rotate-90`
22
* Flip the left and right side of the {nekochan}`yoshi;2em` Yoshi emoji {nekochan}`yoshi;2em;;flip-horizontal`
3+
4+
```{nekochan} snake
5+
:transform: flip-vertical
6+
:height: 2em
7+
```

docs/snippets/with-transform.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
* Skip :nekochan:`skip-nya;2em` rotated 90 degrees clockwise :nekochan:`skip-nya;2em;;rotate-90`
22
* Flip the left and right side of the :nekochan:`yoshi;2em` Yoshi emoji :nekochan:`yoshi;2em;;flip-horizontal`
3+
4+
.. nekochan:: snake
5+
:transform: flip-vertical
6+
:height: 2em

0 commit comments

Comments
 (0)