Skip to content

Commit d3705fa

Browse files
author
Nathan Parsons
committed
Prepare for release
1 parent 52670c5 commit d3705fa

File tree

5 files changed

+46
-29
lines changed

5 files changed

+46
-29
lines changed

CHANGELOG.md

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
# v1.0.3
2-
## 2019-05-03
1+
# v1.1.0
2+
## 2019-06-15
33

4-
1. [](#improved)
5-
* Fixed issues with other colons inline with icons, eg. in times.
6-
* Documented conflict with Markdown Extra definition lists.
7-
8-
9-
# v1.0.2
10-
## 2019-04-20
11-
12-
1. [](#improved)
4+
1. [](#new)
135
* Added support for variants (eg. `fas`, `fal`).
146
* Added support for additional arbitrary classes (eg. `fa-spin`, `icon`).
157

8+
2. [](#improved)
9+
* Fixed issues with other colons inline with icons, eg. in times.
10+
* Documented conflict with Markdown Extra definition lists.
11+
1612

1713
# v1.0.1
1814
## 2016-04-27

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 Joshua Lotz
3+
Copyright (c) 2016 Joshua Lotz, 2019 Nathan Parsons
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

+30-12
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,38 @@ The **Font Awesome plugin** for [Grav](https://github.com/getgrav/grav) allows yo
44

55
![Font Awesome flag icon](assets/fa-flag-to-icon.png)
66

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+
79
## Prerequisites
810

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

1113
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.
1214

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)
1429

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

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

1936
## Configuration
2037

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

2340
```
2441
enabled: true
@@ -27,19 +44,20 @@ enabled: true
2744
## Examples
2845

2946
```
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:
3148
```
3249

3350
Will produce the following HTML:
3451

3552
```
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>
3754
```
3855

3956
### Extra classes
4057

58+
Additional classes can be specified by appending them after the icon name.
59+
4160
- `:fa-code fa-spin:` -> `<i class="fa fa-code fa-spin"></i>`
42-
- `:fa-code fas fa-spin:` -> `<i class="fa fa-code fas fa-spin"></i>`
4361
- `:fas fa-code fa-spin icon:` -> `<i class="fas fa-code fa-spin icon"></i>`
4462
- `:far fa-code literally any other classes:` -> `<i class="far fa-code literally any other classes"></i>`
4563

@@ -50,12 +68,12 @@ Grab a cup of <i class="fa fa-coffee"></i> and write some <i class="fa fa-code">
5068

5169
## Alternatives
5270

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 /]`.
5472

5573
## License
5674

57-
MIT license. See [LICENSE](LICENSE.txt)
75+
MIT license. See [LICENSE](LICENSE)
5876

59-
## Cred
77+
## Credits
6078

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

blueprints.yaml

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
name: Markdown Font Awesome
2-
version: 1.0.1
2+
version: 1.1.0
33
description: "Adds support for Font Awesome icons in Markdown using :emoji: syntax"
44
icon: flag
55
author:
6-
name: Joshua Lotz
7-
8-
url: https://github.com/yoshikin
6+
name: Nathan Parsons
7+
8+
url: https://github.com/n-parsons
9+
homepage: https://github.com/n-parsons/grav-plugin-markdown-fontawesome
10+
keywords: font awesome, emoji, icons
11+
bugs: https://github.com/n-parsons/grav-plugin-markdown-fontawesome/issues
912
license: MIT
1013

1114
form:

markdown-fontawesome.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function onMarkdownInitialized(Event $event)
3434
'name' => 'i',
3535
'text' => '',
3636
'attributes' => array(
37-
'class' => 'fa fa-'.$matches[1],
37+
'class' => 'fa fas fa-'.$matches[1],
3838
),
3939
),
4040
);

0 commit comments

Comments
 (0)