Switched to Twemoji due to license issues (#1338)

This commit is contained in:
Isaac Muse 2019-11-16 12:47:02 -07:00 committed by Martin Donath
parent 4fda0ec3c8
commit 401dfd9e20
3 changed files with 49 additions and 26 deletions

View File

@ -183,69 +183,89 @@ all Admonition qualifiers can be used, e.g. `note`, `question`, `warning` etc.:
### Emoji ### Emoji
[Emoji][13] adds the ability to insert a :shit:-load of emojis that we use in [Emoji][13] adds the ability to insert a :shit:-load of emojis that we use in
our daily lives. See the [EmojiOne demo][14] for a list of all available our daily lives.
emojis. Happy scrolling :tada:
By default, [Emoji][13] uses JoyPixles' emoji under the former name EmojiOne.
Recent versions of the extension lock support to an older version (2.2.7) due
to JoyPixels' newer, less permissible licenses included in later releases. This
restricts support to Unicode 9. To get the latest support for the current
Unicode version, you can use Twemoji instead which has a much more permissable
license. Simply override the default emoji index being used:
```yml
markdown_extensions:
- pymdownx.emoji:
emoji_index: !!python/name:pymdownx.emoji.twemoji
emoji_generator: !!python/name:pymdownx.emoji.to_svg
```
To view all the available short names and emoji available, see [Emoji's documentation][18]
on your chosen index which includes links to the files containing the short names
and emoji associated with each supported index. Happy scrolling :tada:.
!!! warning "Legal disclaimer" !!! warning "Legal disclaimer"
Material has no affiliation with [EmojiOne][15] which is released under Material has no affiliation with [JoyPixles][15] or [Twemoji][14], both
[CC BY 4.0][16]. When including EmojiOne images or CSS, please read the of which use releases that are under [CC BY 4.0][16]. When including
[EmojiOne license][17] to ensure proper usage and attribution. images or CSS from either provider, please read the the respective
licenses: [EmojiOne][17] or [Twemoji][14] to ensure proper usage and
attribution.
[13]: https://facelessuser.github.io/pymdown-extensions/extensions/emoji/ [13]: https://facelessuser.github.io/pymdown-extensions/extensions/emoji/
[14]: https://emoji.codes/ [14]: https://twemoji.twitter.com/
[15]: https://www.joypixels.com/ [15]: https://www.joypixels.com/
[16]: https://creativecommons.org/licenses/by/4.0/legalcode [16]: https://creativecommons.org/licenses/by/4.0/legalcode
[17]: http://emojione.com/licensing/ [17]: https://github.com/joypixels/emojione#emojione-version-2
[18]: https://facelessuser.github.io/pymdown-extensions/extensions/emoji/#default-emoji-indexes
### InlineHilite ### InlineHilite
[InlineHilite][18] adds support for inline code highlighting. It's useful for [InlineHilite][19] adds support for inline code highlighting. It's useful for
short snippets included within body copy, e.g. `#!js var test = 0;` and can be short snippets included within body copy, e.g. `#!js var test = 0;` and can be
achieved by prefixing inline code with a shebang and language identifier, achieved by prefixing inline code with a shebang and language identifier,
e.g. `#!js`. e.g. `#!js`.
[18]: https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/ [19]: https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/
### MagicLink ### MagicLink
[MagicLink][19] detects links in Markdown and auto-generates the necessary [MagicLink][20] detects links in Markdown and auto-generates the necessary
markup, so no special syntax is required. It auto-links `http[s]://` and markup, so no special syntax is required. It auto-links `http[s]://` and
`ftp://` links, as well as references to email addresses. `ftp://` links, as well as references to email addresses.
[19]: https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/ [20]: https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/
### Mark ### Mark
[Mark][20] adds the ability to ==highlight text== like it was marked with a [Mark][21] adds the ability to ==highlight text== like it was marked with a
==text marker==. The portion of text that should be highlighted must be ==text marker==. The portion of text that should be highlighted must be
enclosed in two equal signs `==...==`. enclosed in two equal signs `==...==`.
[20]: https://facelessuser.github.io/pymdown-extensions/extensions/mark/ [21]: https://facelessuser.github.io/pymdown-extensions/extensions/mark/
### SmartSymbols ### SmartSymbols
[SmartSymbols][21] converts markup for special characters into their [SmartSymbols][22] converts markup for special characters into their
corresponding symbols, e.g. arrows (<--, -->, <-->), trademark and copyright corresponding symbols, e.g. arrows (<--, -->, <-->), trademark and copyright
symbols ((c), (tm), (r)) and fractions (1/2, 1/4, ...). symbols ((c), (tm), (r)) and fractions (1/2, 1/4, ...).
[21]: https://facelessuser.github.io/pymdown-extensions/extensions/smartsymbols/ [22]: https://facelessuser.github.io/pymdown-extensions/extensions/smartsymbols/
### SuperFences ### SuperFences
[SuperFences][22] provides the ability to nest code blocks under blockquotes, [SuperFences][23] provides the ability to nest code blocks under blockquotes,
lists and other block elements, which the [Fenced Code Blocks][23] extension lists and other block elements, which the [Fenced Code Blocks][24] extension
from the standard Markdown library doesn't parse correctly. from the standard Markdown library doesn't parse correctly.
SuperFences does also allow [grouping code blocks with tabs][24]. SuperFences does also allow [grouping code blocks with tabs][25].
[22]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/ [23]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
[23]: https://python-markdown.github.io/extensions/fenced_code_blocks/ [24]: https://python-markdown.github.io/extensions/fenced_code_blocks/
[24]: codehilite.md#grouping-code-blocks [25]: codehilite.md#grouping-code-blocks
### Tasklist ### Tasklist
[Tasklist][25] adds support for styled checkbox lists. This is useful for [Tasklist][26] adds support for styled checkbox lists. This is useful for
keeping track of tasks and showing what has been done and has yet to be done. keeping track of tasks and showing what has been done and has yet to be done.
Checkbox lists are like regular lists, but prefixed with `[ ]` for empty or Checkbox lists are like regular lists, but prefixed with `[ ]` for empty or
`[x]` for filled checkboxes. `[x]` for filled checkboxes.
@ -278,12 +298,12 @@ Result:
* [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque * [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
* [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi * [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi
[25]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/ [26]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
### Tilde ### Tilde
[Tilde][26] provides an easy way to ~~strike through~~ cross out text. [Tilde][27] provides an easy way to ~~strike through~~ cross out text.
The portion of text that should be erased must be enclosed in two tildes The portion of text that should be erased must be enclosed in two tildes
`~~...~~` and the extension will take care of the rest. `~~...~~` and the extension will take care of the rest.
[26]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/ [27]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/

View File

@ -94,6 +94,7 @@ markdown_extensions:
- pymdownx.critic - pymdownx.critic
- pymdownx.details - pymdownx.details
- pymdownx.emoji: - pymdownx.emoji:
emoji_index: !!python/name:pymdownx.emoji.twemoji
emoji_generator: !!python/name:pymdownx.emoji.to_svg emoji_generator: !!python/name:pymdownx.emoji.to_svg
- pymdownx.inlinehilite - pymdownx.inlinehilite
- pymdownx.keys - pymdownx.keys

View File

@ -28,7 +28,9 @@
.md-typeset { .md-typeset {
// Correct alignment of emojis // Correct alignment of emojis
.emojione { .emojione,
.twemoji,
.gemoji {
width: px2rem(20px); width: px2rem(20px);
vertical-align: text-top; vertical-align: text-top;
} }