You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-12
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,38 @@ The **Font Awesome plugin** for [Grav](https://github.com/getgrav/grav) allows yo
4
4
5
5

6
6
7
+
**Note:**[N-Parsons/markdown-fontawesome](https://github.com/n-parsons/grav-plugin-markdown-fontawesome) is the new master repository for this plugin (see [getgrav/grav#2544](https://github.com/getgrav/grav/issues/2544)).
8
+
7
9
## Prerequisites
8
10
9
-
The plugin works by looking for colon-wrapped icon names starting with the `:fa-` prefix or `:fa[srlb]? fa-` and converting them to `<i>` tags. Additional classes (including `fa-spin`, etc.) may be specified by including them at the end.
11
+
The plugin works by looking for colon-wrapped icon names starting with `fas fa-`, `far fa-`, `fal fa-`, or `fab fa-` (or `fa fa-`for Font Awesome 4), and converting them to `<i>` tags. Additional classes (including `fa-spin`, etc.) may be specified by including them at the end. Primarily for legacy reasons, the plugin also supports a shortened prefix format, namely `fa-`, which works for both Font Awesome 4 and 5, and inserts `<i class="fa fas fa-*"></i>`.
10
12
11
13
This plugin doesn't contain the actual Font Awesome fonts, so make sure you are using a plugin or theme (such as Learn2 or Antimatter) that include the Font Awesome assets.
12
14
13
-
Also, this plugin conflicts with definition lists in Markdown Extra; if enabled, icons appearing at the start of a line will be treated as part of definitions and will be broken. This currently appears to be the only conflict.
15
+
## Conflicts
16
+
17
+
This plugin conflicts with definition lists in Markdown Extra; if enabled, icons appearing at the start of a line (with no non-whitespace character preceeding them) will be treated as part of a definition list and will be broken. This currently appears to be the only conflict.
18
+
19
+
If this conflict with Markdown Extra is an issue for you, you can either switch to [Shortcode Core](https://github.com/grav/grav-plugin-shortcode-core), or disable Markdown Extra per-page by adding the following to the page frontmatter:
20
+
21
+
```
22
+
markdown:
23
+
extra: false
24
+
```
25
+
26
+
## Installation
27
+
28
+
### GPM (preferred method)
14
29
15
-
## Manual installation
30
+
You can install the plugin by running `bin/gpm install markdown-fontawesome` or searching for `markdown-fontawesome` in the Admin Panel.
16
31
17
-
Download zip version of this repository, unzip to `/your/site/grav/user/plugins` and rename directory to `markdown-fontawesome`.
32
+
### Manual installation
33
+
34
+
Alternatively, you can download the zip version of this repository, unzip to `/your/site/grav/user/plugins` and rename the directory to `markdown-fontawesome`.
18
35
19
36
## Configuration
20
37
21
-
The markdown-fontawesome.yaml file contains only one configuration which turns the plugin on/off.
38
+
The `markdown-fontawesome.yaml` file contains only one configuration option, which turns the plugin on/off.
22
39
23
40
```
24
41
enabled: true
@@ -27,19 +44,20 @@ enabled: true
27
44
## Examples
28
45
29
46
```
30
-
Grab a cup of :fa-coffee: and write some :fa-code:
47
+
Grab a cup of :fas fa-coffee: and write some :fal fa-code:
31
48
```
32
49
33
50
Will produce the following HTML:
34
51
35
52
```
36
-
Grab a cup of <i class="fa fa-coffee"></i> and write some <i class="fa fa-code"></i>
53
+
Grab a cup of <i class="fas fa-coffee"></i> and write some <i class="fal fa-code"></i>
37
54
```
38
55
39
56
### Extra classes
40
57
58
+
Additional classes can be specified by appending them after the icon name.
-`:far fa-code literally any other classes:` -> `<i class="far fa-code literally any other classes"></i>`
45
63
@@ -50,12 +68,12 @@ Grab a cup of <i class="fa fa-coffee"></i> and write some <i class="fa fa-code">
50
68
51
69
## Alternatives
52
70
53
-
If you prefer shortcode syntax`[fa=cog extra=fas /]`, consider using the [Grav Shortcode Plugin](https://github.com/getgrav/grav-plugin-shortcode-core#fontawesome) which also supports Font Awesome.
71
+
If you prefer shortcode syntax, consider using the [Grav Shortcode Plugin](https://github.com/getgrav/grav-plugin-shortcode-core#fontawesome) which also supports Font Awesome via `[fa=cog extra=fas /]`.
54
72
55
73
## License
56
74
57
-
MIT license. See [LICENSE](LICENSE.txt)
75
+
MIT license. See [LICENSE](LICENSE)
58
76
59
-
## Cred
77
+
## Credits
60
78
61
-
This plugin was inspired by the python markdown extension [fontawesome-markdown](https://github.com/bmcorser/fontawesome-markdown) and the first version was based on code from the [Grav Markdown Color Plugin](https://github.com/getgrav/grav-plugin-markdown-color).
79
+
This plugin was originally developed by (yoshikin)[https://github.com/yoshikin]. It was inspired by the python markdown extension [fontawesome-markdown](https://github.com/bmcorser/fontawesome-markdown) and the first version was based on code from the [Grav Markdown Color Plugin](https://github.com/getgrav/grav-plugin-markdown-color).
0 commit comments