Skip to main content

Pelican plugin to add custom emoji to your site

Project description

Pelimoji

Build Status PyPI Version Downloads License

Pelimoji is a Pelican plugin that adds support for custom emoji to your site.

Installation

This plugin can be installed via:

python -m pip install pelimoji

As long as you have not explicitly added a PLUGINS setting to your Pelican settings file, then the newly-installed plugin should be automatically detected and enabled. Otherwise, you must add pelimoji to your existing PLUGINS list. For more information, please see the How to Use Plugins documentation.

Usage

Within your PATH content root create a directory called emoji. To that directory, add any square image files at least 16x16 ending in .png. These will be your emoji, addressable via the filename before the extension, such as :gentoo: if you had a file named gentoo.png in your PELIMOJI_PATH. This is case-sensitive if your filesystem is case-sensitive. 64x64 works best, but any size will do, including 512x512. Just remember, this will affect load speed for your pages.

When compiling your site, the following directory will be created and automatically added to your STATIC_PATHS: PATH/emoji_map/. You'll need to ensure that PATH/emoji_map/emoji.css is loaded as a stylesheet, whether using something like webassets or cssmin, or by adding directly.

You may optionally also specify a PELIMOJI_PREFIX to require if you might have multiple sets of colon-tags that'd overlap. Whereas I might normally use :thumbs-up:, I could then specify PELIMOJI_PREFIX = "emoji", and my tag would instead be :emoji-thumbs-up:.

By default this plugin operates on source content files with the following file extensions: ["md", "html", "rst"], corresponding to Markdown, HTML, and reStructuredText. If you, say, want this plugin to also process files ending in .txt, you should add the following to your settings file:

PELIMOJI_FILE_EXTENSIONS = ["md", "html", "rst", "txt"]

You can specify a PELIMOJI_SIZE_MULTIPLIER setting, which defaults to 1, to increase the size of all emoji when they are rendered. Specifying 2 via this setting will cause each emoji to be twice as large as the default, 3 will make them three times larger, et cetera. For example:

PELIMOJI_SIZE_MULTIPLIER = 2

Contributing

Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on existing issues.

To start contributing to this plugin, review the Contributing to Pelican documentation, beginning with the Contributing Code section.

License

This project is licensed under the AGPL-3.0 license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pelimoji-1.2.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pelimoji-1.2.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pelimoji-1.2.0.tar.gz.

File metadata

  • Download URL: pelimoji-1.2.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pelimoji-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e91c81360b6bd9b146b8ff66aa9b70ffa65abb5b7d5cbe3f49bae99584094f49
MD5 e2e20e6ecc9c0950d37f8a1132e392e6
BLAKE2b-256 2d852d0f4c61c55b6fa4a41d3fe25071ca9c56a620b30074b6f5ca003ae46b43

See more details on using hashes here.

Provenance

The following attestation bundles were made for pelimoji-1.2.0.tar.gz:

Publisher: main.yml on pelican-plugins/pelimoji

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pelimoji-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pelimoji-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pelimoji-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74fadb07251f5e5e0b810b6e99dba7d330335bf8946e99f414b23357fcbac4ca
MD5 c2df44751b832d58632c2840ed7e0a6f
BLAKE2b-256 7b68d0d137ba006948a49767ac403368b940a2eab853b8f6ec5d4228e953d0db

See more details on using hashes here.

Provenance

The following attestation bundles were made for pelimoji-1.2.0-py3-none-any.whl:

Publisher: main.yml on pelican-plugins/pelimoji

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page