forked from forks/microblog.pub
Re-add support for custom emoji
This commit is contained in:
parent
c740813b57
commit
6384dbcd93
2 changed files with 14 additions and 0 deletions
|
@ -86,6 +86,7 @@ class Config(pydantic.BaseModel):
|
||||||
code_highlighting_theme = "friendly_grayscale"
|
code_highlighting_theme = "friendly_grayscale"
|
||||||
blocked_servers: list[_BlockedServer] = []
|
blocked_servers: list[_BlockedServer] = []
|
||||||
custom_footer: str | None = None
|
custom_footer: str | None = None
|
||||||
|
emoji: str | None = None
|
||||||
|
|
||||||
inbox_retention_days: int = 15
|
inbox_retention_days: int = 15
|
||||||
|
|
||||||
|
@ -152,6 +153,9 @@ KEY_PATH = (
|
||||||
(ROOT_DIR / CONFIG.key_path) if CONFIG.key_path else ROOT_DIR / "data" / "key.pem"
|
(ROOT_DIR / CONFIG.key_path) if CONFIG.key_path else ROOT_DIR / "data" / "key.pem"
|
||||||
)
|
)
|
||||||
EMOJIS = "😺 😸 😹 😻 😼 😽 🙀 😿 😾"
|
EMOJIS = "😺 😸 😹 😻 😼 😽 🙀 😿 😾"
|
||||||
|
if CONFIG.emoji:
|
||||||
|
EMOJIS = CONFIG.emoji
|
||||||
|
|
||||||
# Emoji template for the FE
|
# Emoji template for the FE
|
||||||
EMOJI_TPL = '<img src="/static/twemoji/{filename}.svg" alt="{raw}" class="emoji">'
|
EMOJI_TPL = '<img src="/static/twemoji/{filename}.svg" alt="{raw}" class="emoji">'
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,16 @@ privacy_replace = [
|
||||||
|
|
||||||
### Customization
|
### Customization
|
||||||
|
|
||||||
|
#### Default emoji
|
||||||
|
|
||||||
|
If you don't like cats, or need more emoji, you can add your favorite emoji in `profile.toml` and it will replace the default ones:
|
||||||
|
|
||||||
|
```
|
||||||
|
emoji = "🙂🐹📌"
|
||||||
|
```
|
||||||
|
|
||||||
|
You can copy/paste them from [getemoji.com](https://getemoji.com/).
|
||||||
|
|
||||||
#### Custom emoji
|
#### Custom emoji
|
||||||
|
|
||||||
You can add custom emoji in the `data/custom_emoji` directory and they will be picked automatically.
|
You can add custom emoji in the `data/custom_emoji` directory and they will be picked automatically.
|
||||||
|
|
Loading…
Reference in a new issue