New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji shortcode #2748

Merged
merged 7 commits into from May 9, 2017

Conversation

Projects
None yet
2 participants
@ralsina
Member

ralsina commented May 8, 2017

Pull Request Checklist

  • I’ve read the guidelines for contributing.
  • I updated AUTHORS.txt and CHANGES.txt (if the change is non-trivial) and documentation (if applicable).
  • I tested my changes.

Description

A simple shortcode for emoji support: {{% emoji cry_face %}}

Show outdated Hide outdated nikola/plugins/shortcode/emoji/__init__.py
@@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
# This file is public domain according to its author, Brian Hsu

This comment has been minimized.

@Kwpolska

Kwpolska May 8, 2017

Member

leftover 1

@Kwpolska

Kwpolska May 8, 2017

Member

leftover 1

Show outdated Hide outdated nikola/plugins/shortcode/emoji/__init__.py
class Plugin(ShortcodePlugin):
"""Plugin for gist directive."""

This comment has been minimized.

@Kwpolska

Kwpolska May 8, 2017

Member

leftover 2

@Kwpolska

Kwpolska May 8, 2017

Member

leftover 2

@Kwpolska

This comment has been minimized.

Show comment
Hide comment
@Kwpolska

Kwpolska May 8, 2017

Member

Looks good, but perhaps we could merge all those JSON files into a more compact, manageable format of {name: icon}?

Member

Kwpolska commented May 8, 2017

Looks good, but perhaps we could merge all those JSON files into a more compact, manageable format of {name: icon}?

ralsina added some commits May 8, 2017

@ralsina

This comment has been minimized.

Show comment
Hide comment
@ralsina

ralsina May 8, 2017

Member

@Kwpolska yeah, I could merge them but then I would need to do it again if I ever refresh that data.

Member

ralsina commented May 8, 2017

@Kwpolska yeah, I could merge them but then I would need to do it again if I ever refresh that data.

@Kwpolska

This comment has been minimized.

Show comment
Hide comment
@Kwpolska

Kwpolska May 8, 2017

Member

@ralsina I didn’t expect you to do it by hand.

Member

Kwpolska commented May 8, 2017

@ralsina I didn’t expect you to do it by hand.

@ralsina

This comment has been minimized.

Show comment
Hide comment
@ralsina

ralsina May 8, 2017

Member

Also, there are two turkey emojis! (bird and country, I guess)

Member

ralsina commented May 8, 2017

Also, there are two turkey emojis! (bird and country, I guess)

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 -2017 Shayan Rais

This comment has been minimized.

@Kwpolska

Kwpolska May 9, 2017

Member

Add a link to the repo somewhere.

@Kwpolska

Kwpolska May 9, 2017

Member

Add a link to the repo somewhere.

@ralsina

This comment has been minimized.

Show comment
Hide comment
@ralsina

ralsina May 9, 2017

Member
Member

ralsina commented May 9, 2017

Show outdated Hide outdated nikola/plugins/shortcode/emoji/__init__.py
output = '''<span class="emoji">{}</span>'''.format(TABLE[name])
except KeyError:
LOGGER.warning('Unknown emoji {}'.format(name))
output = '''<span class="emoji, error">{}</span>'''.format(name)

This comment has been minimized.

@Kwpolska

Kwpolska May 9, 2017

Member

No comma here.

@Kwpolska

Kwpolska May 9, 2017

Member

No comma here.

ralsina added some commits May 9, 2017

@ralsina ralsina merged commit c5b86a4 into master May 9, 2017

0 of 4 checks passed

continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@ralsina ralsina deleted the emoji-sc branch May 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment