Skip to content
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

Integrating with img-amp / a bit more generalization [feature request] #42

Closed
rajsite opened this issue Jun 19, 2016 · 3 comments
Closed

Comments

@rajsite
Copy link

rajsite commented Jun 19, 2016

I'm using AMP HTML on github pages based off of the amplify theme and for the most part everything is awesome 🎉 but unfortunately I cannot use emoji directly 😢.

The problem is that AMP HTML doesn't want one to use img tags directly but instead wants you to use amp-img tags.

While I'm not expecting amp-img support directly (where would it end 😱), I was wondering if it was possible to make jemoji more configurable by using a layout template.

For example, in the _config.yml a setting could be added like

emoji:
  layout: emoji_include

So then whenever an emoji is used like :tada:, the template _includes/emoji_include.html is used with a variable passed in such as include.emoji_url.

For my amp-img example I could then have the following contents in _includes/emoji_include.html:

<amp-img width="20" height="20" layout="fixed" src="{{ include.emoji_url }}"></amp-img>

And the result of that template is what would be inserted into the page. I imagine some good variables to pass in would probably be the url, alt text, width, and height.

Let me know your thoughts or if I completely missed a way to achieve a similar result as is! 💯

@jekyllbot
Copy link
Contributor

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@edm00se
Copy link

edm00se commented Oct 26, 2016

This is a great idea and an elegant solution to the situation use of jemoji introduces with need for validation for an AMP site. 👍

@jekyllbot jekyllbot removed the stale label Oct 26, 2016
@rajsite
Copy link
Author

rajsite commented Jun 18, 2017

I'd still love to have jemoji work with amp-img based tags! Ran into this again recently :)

@jekyll jekyll locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants