diff options
author | lambda <lain@soykaf.club> | 2019-04-08 09:50:00 +0000 |
---|---|---|
committer | lambda <lain@soykaf.club> | 2019-04-08 09:50:00 +0000 |
commit | 23067908de957bb1e7ad2c87e64ae91e4328cb87 (patch) | |
tree | 2c75327c2b35d5759eb971d5486a7f30bef8d386 /docs/config/custom_emoji.md | |
parent | b177e1e7f330ff1531be190949db7f75e378a449 (diff) | |
parent | 7410aee886fbb38615bb595b8b7be0722761a0a4 (diff) | |
download | pleroma-23067908de957bb1e7ad2c87e64ae91e4328cb87.tar.gz |
Merge branch 'feature/770-add-emoji-tags' into 'develop'
Feature/770 add emoji tags
See merge request pleroma/pleroma!998
Diffstat (limited to 'docs/config/custom_emoji.md')
-rw-r--r-- | docs/config/custom_emoji.md | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/docs/config/custom_emoji.md b/docs/config/custom_emoji.md index e833d2080..419a7d0e2 100644 --- a/docs/config/custom_emoji.md +++ b/docs/config/custom_emoji.md @@ -11,8 +11,43 @@ image files (in `/priv/static/emoji/custom`): `happy.png` and `sad.png` content of `config/custom_emoji.txt`: ``` -happy, /emoji/custom/happy.png -sad, /emoji/custom/sad.png +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`. +```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` |