From bb8367a575721481c735c4569910f0ada5b2a9b5 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Sat, 19 Sep 2026 16:22:19 +0200 Subject: [PATCH 1/3] feat: Embed components --- overrides/main.html | 72 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 overrides/main.html diff --git a/overrides/main.html b/overrides/main.html new file mode 100644 index 00000000..1136b92b --- /dev/null +++ b/overrides/main.html @@ -0,0 +1,72 @@ +{% extends "base.html" %} +{% block extrahead %} +{% set ns = namespace(title="", content="", readtime_s="", icon_href="https://guide.pycord.dev/img/logo.png") %} +{% set ns.title = page.meta.title if page.meta and page.meta.title else page.title|striptags %} +{% set ns.content = page.meta.description if page.meta and page.meta.description else config.site_description %} + +{% if page.url %} +{% set chars = page.content|striptags|length %} +{% if chars > 300 %} +{% set minutes = (chars / 1590)|round|int %} +{% if minutes < 1 %}{% set minutes = 1 %}{% endif %} +{% set ns.readtime_s = lang.t("readtime.one") if minutes == 1 else lang.t("readtime.other")|replace("#", minutes|string) %} +{% set stripped = page.content|striptags %} +{% if stripped|length > 250 %} +{% set ns.content = stripped[:247] ~ "..." %} +{% else %} +{% set ns.content = stripped %} +{% endif %} +{% endif %} +{% endif %} + +{% endblock %} \ No newline at end of file From cf2cb003544767f079bedb2ec32d5d159a08d717 Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Sat, 19 Sep 2026 16:27:56 +0200 Subject: [PATCH 2/3] feat: Add separatpr --- overrides/main.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/overrides/main.html b/overrides/main.html index 1136b92b..ec987727 100644 --- a/overrides/main.html +++ b/overrides/main.html @@ -46,6 +46,11 @@ } ] }, + { + "type": 14, + "divider": false, + "spacing": 1 + }, { "type": 1, "components": [ From 9fcc41f43b0faf487224647ab5ff597adb3fab8d Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Sat, 19 Sep 2026 20:57:15 +0200 Subject: [PATCH 3/3] Update main.html Signed-off-by: Lala Sabathil --- overrides/main.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overrides/main.html b/overrides/main.html index ec987727..15b88881 100644 --- a/overrides/main.html +++ b/overrides/main.html @@ -34,7 +34,7 @@ "accessory": { "type": 11, "media": { - "url": {{ icon_href | tojson }} + "url": {{ ns.icon_href | tojson }} }, "description": null, "spoiler": false @@ -74,4 +74,4 @@ } } -{% endblock %} \ No newline at end of file +{% endblock %}