mirror of
https://github.com/versia-pub/docs.git
synced 2025-12-06 06:18:19 +01:00
docs: 📝 Add Emoji structure
This commit is contained in:
parent
bdfc9693c0
commit
eaf44a141d
48
app/structures/emoji/page.mdx
Normal file
48
app/structures/emoji/page.mdx
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
export const metadata = {
|
||||||
|
title: 'Emoji',
|
||||||
|
description: 'Definition of the Emoji structure',
|
||||||
|
}
|
||||||
|
|
||||||
|
# Custom Emoji
|
||||||
|
|
||||||
|
<Note>
|
||||||
|
This structure is part of the [Custom Emojis](/extensions/custom-emojis) extension. As such, it is not part of the core Lysand specification.
|
||||||
|
|
||||||
|
If you are not implementing the Custom Emojis extension, you can ignore this structure.
|
||||||
|
</Note>
|
||||||
|
|
||||||
|
## Entity Definition
|
||||||
|
|
||||||
|
<Row>
|
||||||
|
<Col>
|
||||||
|
<Properties>
|
||||||
|
<Property name="name" type="string" required={true}>
|
||||||
|
Emoji name, optionally surrounded by identification characters (for example, colons: `:happy_face:`).
|
||||||
|
|
||||||
|
Name must match the regex `^[a-zA-Z0-9_-]+$`.
|
||||||
|
|
||||||
|
Identification characters must not match the name regex (must not be alphanumeric/underscore/hyphen).
|
||||||
|
</Property>
|
||||||
|
<Property name="content" type="ContentFormat" required={true} typeLink="/structures/content-format">
|
||||||
|
Emoji content. Must be an image format (`image/*`).
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Col>
|
||||||
|
|
||||||
|
<Col sticky>
|
||||||
|
|
||||||
|
```jsonc {{ 'title': 'Example Emoji' }}
|
||||||
|
{
|
||||||
|
"name": ":happy_face:",
|
||||||
|
"content": {
|
||||||
|
"image/webp": {
|
||||||
|
"content": "https://cdn.example.com/emojis/happy_face.webp",
|
||||||
|
"remote": true,
|
||||||
|
"description": "A happy emoji smiling.",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
@ -265,6 +265,7 @@ export const navigation: NavGroup[] = [
|
||||||
links: [
|
links: [
|
||||||
{ title: "ContentFormat", href: "/structures/content-format" },
|
{ title: "ContentFormat", href: "/structures/content-format" },
|
||||||
{ title: "Collection", href: "/structures/collection" },
|
{ title: "Collection", href: "/structures/collection" },
|
||||||
|
{ title: "Custom Emoji", href: "/structures/emoji" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue