From eaf44a141d1a115835ff4e7eef6c0d7e8310d3b0 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Tue, 6 Aug 2024 14:59:21 +0200 Subject: [PATCH] docs: :memo: Add Emoji structure --- app/structures/emoji/page.mdx | 48 +++++++++++++++++++++++++++++++++++ components/Navigation.tsx | 1 + 2 files changed, 49 insertions(+) create mode 100644 app/structures/emoji/page.mdx diff --git a/app/structures/emoji/page.mdx b/app/structures/emoji/page.mdx new file mode 100644 index 0000000..5b648a5 --- /dev/null +++ b/app/structures/emoji/page.mdx @@ -0,0 +1,48 @@ +export const metadata = { + title: 'Emoji', + description: 'Definition of the Emoji structure', +} + +# Custom Emoji + + + 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. + + +## Entity Definition + + + + + + 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). + + + Emoji content. Must be an image format (`image/*`). + + + + + + + ```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.", + } + } + } + ``` + + + \ No newline at end of file diff --git a/components/Navigation.tsx b/components/Navigation.tsx index b3a44ce..9fe4e13 100644 --- a/components/Navigation.tsx +++ b/components/Navigation.tsx @@ -265,6 +265,7 @@ export const navigation: NavGroup[] = [ links: [ { title: "ContentFormat", href: "/structures/content-format" }, { title: "Collection", href: "/structures/collection" }, + { title: "Custom Emoji", href: "/structures/emoji" }, ], }, {