From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 755918D3A; Tue, 16 Jun 2026 09:36:09 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id F27AC8D12; Tue, 16 Jun 2026 09:36:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=0.4 required=3.0 tests=CONTENT_AFTER_HTML,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DMARC_MISSING,FROM_SUSPICIOUS_NTLD, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,T_PDS_OTHER_BAD_TLD autolearn=no autolearn_force=no version=4.0.1 Received: from mail-108-mta88.mxroute.com (mail-108-mta88.mxroute.com [136.175.108.88]) by atuin.qyliss.net (Postfix) with ESMTPS id D65C08C62 for ; Tue, 16 Jun 2026 09:36:04 +0000 (UTC) Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta88.mxroute.com (ZoneMTA) with ESMTPSA id 19ecfc9b34700067f7.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Tue, 16 Jun 2026 09:36:02 +0000 X-Zone-Loop: b3101f41156d57cf9f933a06e9286895d5e68eb0281b X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gagarin.work; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wrUfGujztAIlHVZEMU/T7p8eRe80Hn9BFjCmQKXQwXE=; b=uY3eGwMmLjweyIiM0Z0O+m5gcL GLJOO3ZPNiQK4YnyO+vLYzKrpKei0/L58CAfuaTSC+4XarE089n622wQGwwhFJDZPJn6HzXTH0wPI AxJFQHldW1nbUGXItBJwd0RXnV1oIVZVNR1DSpuSGZeOSClYFINOqQ5lOyu53OZQUrGRkHNY+mbvc 1LsuHnyEtdx448vTimrsYUzCbHpdm3rjDbC2zJT45x2DKtdwKbda7klezg6bwU2y2wN3UNYlrdtMr mp0IP+3mw6Sw4CKZaC8e6vY1cPRkVTZ+EOc+A+DKxLSh3ZP3jkfb9Bqlq6H9Z1xDJGDipk2IlJ5sQ nGKU+C1A==; From: Valentin Gagarin To: devel@spectrum-os.org Subject: [PATCH v3 1/3] Documentation: align Jekyll page style to rest of website Date: Tue, 16 Jun 2026 11:35:21 +0200 Message-ID: <20260616093527.388679-2-valentin@gagarin.work> In-Reply-To: <20260616093527.388679-1-valentin@gagarin.work> References: <20260608164938.290202-1-valentin@gagarin.work> <20260616093527.388679-1-valentin@gagarin.work> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-Id: valentin@gagarin.work Message-ID-Hash: DIBW3QW7VD5K2TN54EMOLMNQ3OVKV3NX X-Message-ID-Hash: DIBW3QW7VD5K2TN54EMOLMNQ3OVKV3NX X-MailFrom: valentin@gagarin.work X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Valentin Gagarin X-Mailman-Version: 3.3.10 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - Render a sitemap and link it on every page - Show the sitemap for the documentation subtree at the documentation entry point This replaces the sidebar. - Show breadcrumb navigation at the top of every documentation page - Use the global stylesheet for all documentatio pages Recreate a minimal style for admonitions and code blocks. Signed-off-by: Valentin Gagarin --- Documentation/_includes/footer_custom.html | 5 ++ Documentation/_includes/sitemap.html | 58 +++++++++++++++++++ Documentation/_layouts/page.html | 31 ++++++++++ ...architecture-decision-record-template.adoc | 2 +- Documentation/doc/index.adoc | 7 +++ Documentation/sitemap.adoc | 8 +++ Documentation/style.css | 46 +++++++++++++++ 7 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 Documentation/_includes/sitemap.html create mode 100644 Documentation/_layouts/page.html create mode 100644 Documentation/sitemap.adoc diff --git a/Documentation/_includes/footer_custom.html b/Documentation/_includes/footer_custom.html index a8f2edb..ab55e04 100644 --- a/Documentation/_includes/footer_custom.html +++ b/Documentation/_includes/footer_custom.html @@ -14,3 +14,8 @@ Commons Attribution-ShareAlike 4.0 International License, or the Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + +

+Sitemap +· +Impressum diff --git a/Documentation/_includes/sitemap.html b/Documentation/_includes/sitemap.html new file mode 100644 index 0000000..723bdb3 --- /dev/null +++ b/Documentation/_includes/sitemap.html @@ -0,0 +1,58 @@ +{% comment %} +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: 2026 Valentin Gagarin + +Render a nested sitemap rooted at a given URL prefix. Hierarchy is +derived from URL structure: a page is a direct child of prefix P iff +its URL starts with P, is not P itself, and contains no further path +segments below P. +{% endcomment %} + +{%- assign default_root = "/" -%} +{% comment %} +`prefix` is the URL of the section to list children of. It must end with "/", +which we assume if it is constructed by a directory and contains an index file. +{% endcomment %} +{%- assign prefix = include.prefix | default: default_root -%} +{%- capture inner -%} + {%- assign candidates = site.html_pages + | where_exp: "p", "p.url contains prefix" + | where_exp: "p", "p.url != prefix" -%} + {%- comment %} + Ordered pages first, ascending. The rest after, in URL order, so output is deterministic. + {%- endcomment %} + {%- assign ordered = candidates | where_exp: "p", "p.nav_order" | sort: "nav_order" -%} + {%- assign unordered = candidates | where_exp: "p", "p.nav_order == nil" | sort: "url" -%} + {%- assign sorted = ordered | concat: unordered -%} + {%- for p in sorted -%} + {%- comment %} + `assign` is page-global. A recursive include below may have overwritten `prefix`. + {%- endcomment %} + {%- assign prefix = include.prefix | default: default_root -%} + {%- assign url_start = p.url | slice: 0, prefix.size -%} + {%- if url_start == prefix -%} + {%- assign suffix = p.url | slice: prefix.size, p.url.size -%} + {%- assign without_slashes = suffix | replace: "/", "" -%} + {%- assign slashes = suffix.size | minus: without_slashes.size -%} + {%- assign is_index = false -%} + {%- if p.name == "index.adoc" -%}{%- assign is_index = true -%}{%- endif -%} + {%- assign is_page = false -%} + {%- if is_index == false and slashes == 0 -%}{%- assign is_page = true -%}{%- endif -%} + {%- assign is_section = false -%} + {%- if is_index and slashes == 1 -%}{%- assign is_section = true -%}{%- endif -%} + {%- if is_page or is_section %} +

  • + {{ p.title }} + {%- if is_section -%} + {%- include sitemap.html prefix=p.url -%} + {%- endif -%} +
  • + {%- endif -%} + {%- endif -%} + {%- endfor -%} +{%- endcapture -%} +{%- assign trimmed = inner | strip -%} +{%- if trimmed != "" %} +
      {{ inner }} +
    +{%- endif -%} diff --git a/Documentation/_layouts/page.html b/Documentation/_layouts/page.html new file mode 100644 index 0000000..cb1bb7b --- /dev/null +++ b/Documentation/_layouts/page.html @@ -0,0 +1,31 @@ +{% comment %} +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: 2026 Valentin Gagarin +{% endcomment %} + + + + + + + + +{% include favicon.html %} + + +{{ page.title }} + + + + + +{{ content }} + +{% include footer_custom.html %} + diff --git a/Documentation/doc/decisions/000-lightweight-architecture-decision-record-template.adoc b/Documentation/doc/decisions/000-lightweight-architecture-decision-record-template.adoc index 2535cb3..dcec7c6 100644 --- a/Documentation/doc/decisions/000-lightweight-architecture-decision-record-template.adoc +++ b/Documentation/doc/decisions/000-lightweight-architecture-decision-record-template.adoc @@ -1,4 +1,4 @@ -# Title += 000 Template // SPDX-FileCopyrightText: 2022 Unikie // SPDX-License-Identifier: GFDL-1.3-no-invariants-or-later OR CC-BY-SA-4.0 diff --git a/Documentation/doc/index.adoc b/Documentation/doc/index.adoc index cc25fd3..3bf3934 100644 --- a/Documentation/doc/index.adoc +++ b/Documentation/doc/index.adoc @@ -1,5 +1,6 @@ = Spectrum Documentation :page-nav_exclude: true +:page-liquid: // SPDX-FileCopyrightText: 2022 Alyssa Ross // SPDX-FileCopyrightText: 2022 Unikie @@ -30,3 +31,9 @@ Once you are up and running, see If you are thinking of contributing to the Spectrum code or docs, see xref:contributing/index.adoc[Contributing]. + +== Documentation index + +++++ +{% include sitemap.html prefix="/doc/" %} +++++ diff --git a/Documentation/sitemap.adoc b/Documentation/sitemap.adoc new file mode 100644 index 0000000..65198a4 --- /dev/null +++ b/Documentation/sitemap.adoc @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +// SPDX-FileCopyrightText: 2026 Valentin Gagarin += Sitemap +:page-liquid: + +++++ +{% include sitemap.html %} +++++ diff --git a/Documentation/style.css b/Documentation/style.css index f4d4c4e..f8cb9da 100644 --- a/Documentation/style.css +++ b/Documentation/style.css @@ -25,3 +25,49 @@ var { :target { background: yellow; } + +:root { + --bg: Canvas; + --code-bg: whitesmoke; +} + +code { + background: var(--code-bg); + padding: 0.1em 0.3em; +} + +pre { + background: var(--code-bg); + padding: 1rem; + line-height: 1.5; + overflow-x: auto; +} + +pre code { + background: none; + padding: 0; + border-radius: 0; +} + +.admonitionblock { + border-left: 0.5rem solid var(--callout-accent, --bg); + background: var(--callout-bg, --code-bg); + margin: 1rem 0; +} + +.admonitionblock td { + padding: 1rem; + vertical-align: top; +} + +.admonitionblock td.icon { + white-space: nowrap; + color: var(--callout-accent); + font-weight: bold; +} + +.admonitionblock.note { --callout-accent: steelblue; --callout-bg: aliceblue; } +.admonitionblock.tip { --callout-accent: seagreen; --callout-bg: honeydew; } +.admonitionblock.important { --callout-accent: indigo; --callout-bg: ghostwhite; } +.admonitionblock.warning { --callout-accent: orangered; --callout-bg: seashell; } +.admonitionblock.caution { --callout-accent: red; --callout-bg: mistyrose; } -- 2.54.0