summaryrefslogtreecommitdiff
path: root/docs/config/custom_emoji.md
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-04-17 12:22:32 +0300
committerrinpatch <rinpatch@sdf.org>2019-04-17 12:22:32 +0300
commit627e5a0a4992cc19fc65a7e93a09c470c8e2bf33 (patch)
tree0f38b475e8554863a1cbbd7750c19d4cd1336eb1 /docs/config/custom_emoji.md
parentd6ab701a14f7c9fb4d59953648c425e04725fc62 (diff)
parent73df3046e014ae16e03f16a9c82921652cefcb54 (diff)
downloadpleroma-627e5a0a4992cc19fc65a7e93a09c470c8e2bf33.tar.gz
pleroma-627e5a0a4992cc19fc65a7e93a09c470c8e2bf33.zip
Merge branch 'develop' into feature/database-compaction
Diffstat (limited to 'docs/config/custom_emoji.md')
-rw-r--r--docs/config/custom_emoji.md53
1 files changed, 53 insertions, 0 deletions
diff --git a/docs/config/custom_emoji.md b/docs/config/custom_emoji.md
new file mode 100644
index 000000000..5ce9865a2
--- /dev/null
+++ b/docs/config/custom_emoji.md
@@ -0,0 +1,53 @@
+# Custom Emoji
+
+To add custom emoji:
+* Add the image file(s) to `priv/static/emoji/custom`
+* In case of conflicts: add the desired shortcode with the path to `config/custom_emoji.txt`, comma-separated and one per line
+* Force recompilation (``mix clean && mix compile``)
+
+Example:
+
+image files (in `/priv/static/emoji/custom`): `happy.png` and `sad.png`
+
+content of `config/custom_emoji.txt`:
+```
+happy, /emoji/custom/happy.png, Tag1,Tag2
+sad, /emoji/custom/sad.png, Tag1
+foo, /emoji/custom/foo.png
+```
+
+The files should be PNG (APNG is okay with `.png` for `image/png` Content-type) and under 50kb for compatibility with mastodon.
+
+## Emoji tags (groups)
+
+Default tags are set in `config.exs`. To set your own tags, copy the structure to your secrets file (`prod.secret.exs` or `dev.secret.exs`) and edit it.
+```elixir
+config :pleroma, :emoji,
+ shortcode_globs: ["/emoji/custom/**/*.png"],
+ groups: [
+ Finmoji: "/finmoji/128px/*-128.png",
+ Custom: ["/emoji/*.png", "/emoji/custom/*.png"]
+ ]
+```
+
+Order of the `groups` matters, so to override default tags just put your group on top of the list. E.g:
+```elixir
+config :pleroma, :emoji,
+ shortcode_globs: ["/emoji/custom/**/*.png"],
+ groups: [
+ "Finmoji special": "/finmoji/128px/a_trusted_friend-128.png", # special file
+ "Cirno": "/emoji/custom/cirno*.png", # png files in /emoji/custom/ which start with `cirno`
+ "Special group": "/emoji/custom/special_folder/*.png", # png files in /emoji/custom/special_folder/
+ "Another group": "/emoji/custom/special_folder/*/.png", # png files in /emoji/custom/special_folder/ subfolders
+ Finmoji: "/finmoji/128px/*-128.png",
+ Custom: ["/emoji/*.png", "/emoji/custom/*.png"]
+ ]
+```
+
+Priority of tags assigns in emoji.txt and custom.txt:
+
+`tag in file > special group setting in config.exs > default setting in config.exs`
+
+Priority for globs:
+
+`special group setting in config.exs > default setting in config.exs`