syntax highlighting
[akkoma] / docs / config / custom_emoji.md
index e47a75c8ec3d44de94340f2be4f64e5317e08b9b..96fcb2fc6a8b56d5479b27a58a36f42a79796413 100644 (file)
@@ -18,21 +18,36 @@ 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
-
-Changing default tags:
-
-* For `Finmoji`, `emoji.txt` and `custom_emoji.txt` are added default tags, which can be configured in the `config.exs`:
-* For emoji loaded from globs:
-    - `priv/static/emoji/custom/*.png` - `custom_tag`, can be configured in `config.exs`
-    - `priv/static/emoji/custom/TagName/*.png` - folder (`TagName`) is used as tag
-
+# 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"],
-  custom_tag: "Custom", # Default tag for emoji in `priv/static/emoji/custom` path
-  finmoji_tag: "Finmoji", # Default tag for Finmoji
-  emoji_tag: "Emoji", # Default tag for emoji.txt
-  custom_emoji_tag: "Custom" # Default tag for custom_emoji.txt
+  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`