diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-04-22 13:08:30 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-04-22 13:08:30 +0700 |
commit | e8c2f9a73a37636a9a8ed5c2998617b841f482da (patch) | |
tree | 4b194e631d2bbb58b8522c3d74a0b0c2ea09fedd /docs/config | |
parent | 38926a063a39c4d4387049f5d364f72a9f8bd2de (diff) | |
parent | 7fcbda702e76b6390076c28832f5aea80086d15a (diff) | |
download | pleroma-e8c2f9a73a37636a9a8ed5c2998617b841f482da.tar.gz |
Merge remote-tracking branch 'pleroma/develop' into feature/disable-account
Diffstat (limited to 'docs/config')
-rw-r--r-- | docs/config/custom_emoji.md | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/docs/config/custom_emoji.md b/docs/config/custom_emoji.md index 419a7d0e2..ac28635d0 100644 --- a/docs/config/custom_emoji.md +++ b/docs/config/custom_emoji.md @@ -1,15 +1,25 @@ # Custom Emoji +Before you add your own custom emoji, check if they are available in an existing pack. +See `Mix.Tasks.Pleroma.Emoji` for information about emoji packs. + 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``) +* Create the `STATIC-DIR/emoji/` directory if it doesn't exist + (`STATIC-DIR` is configurable, `instance/static/` by default) +* Create a directory with whatever name you want (custom is a good name to show the purpose of it). + This will create a local emoji pack. +* Put your `.png` emoji files in that directory. In case of conflicts, you can create an `emoji.txt` + file in that directory and specify a custom shortcode using the following format: + `shortcode, file-path, tag1, tag2, etc`. One emoji per line. Note that if you do so, + you'll have to list all other emojis in the pack too. +* Either restart pleroma or connect to the iex session pleroma's running and + run `Pleroma.Emoji.reload/0` in it. Example: -image files (in `/priv/static/emoji/custom`): `happy.png` and `sad.png` +image files (in `instance/static/emoji/custom`): `happy.png` and `sad.png` -content of `config/custom_emoji.txt`: +content of `emoji.txt`: ``` happy, /emoji/custom/happy.png, Tag1,Tag2 sad, /emoji/custom/sad.png, Tag1 @@ -20,7 +30,7 @@ The files should be PNG (APNG is okay with `.png` for `image/png` Content-type) ## Emoji tags (groups) -Default tags are set in `config.exs`. +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"], |