e47a75c8ec3d44de94340f2be4f64e5317e08b9b
[akkoma] / docs / config / custom_emoji.md
1 # Custom Emoji
2
3 To add custom emoji:
4 * Add the image file(s) to `priv/static/emoji/custom`
5 * In case of conflicts: add the desired shortcode with the path to `config/custom_emoji.txt`, comma-separated and one per line
6 * Force recompilation (``mix clean && mix compile``)
7
8 Example:
9
10 image files (in `/priv/static/emoji/custom`): `happy.png` and `sad.png`
11
12 content of `config/custom_emoji.txt`:
13 ```
14 happy, /emoji/custom/happy.png, Tag1,Tag2
15 sad, /emoji/custom/sad.png, Tag1
16 foo, /emoji/custom/foo.png
17 ```
18
19 The files should be PNG (APNG is okay with `.png` for `image/png` Content-type) and under 50kb for compatibility with mastodon.
20
21 # Emoji tags
22
23 Changing default tags:
24
25 * For `Finmoji`, `emoji.txt` and `custom_emoji.txt` are added default tags, which can be configured in the `config.exs`:
26 * For emoji loaded from globs:
27 - `priv/static/emoji/custom/*.png` - `custom_tag`, can be configured in `config.exs`
28 - `priv/static/emoji/custom/TagName/*.png` - folder (`TagName`) is used as tag
29
30
31 ```
32 config :pleroma, :emoji,
33 shortcode_globs: ["/emoji/custom/**/*.png"],
34 custom_tag: "Custom", # Default tag for emoji in `priv/static/emoji/custom` path
35 finmoji_tag: "Finmoji", # Default tag for Finmoji
36 emoji_tag: "Emoji", # Default tag for emoji.txt
37 custom_emoji_tag: "Custom" # Default tag for custom_emoji.txt
38 ```