patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Valentin Gagarin <valentin@gagarin.work>
To: devel@spectrum-os.org
Cc: Valentin Gagarin <valentin@gagarin.work>
Subject: [PATCH v3 0/3] Documentation: render all pages in one style
Date: Tue, 16 Jun 2026 11:35:20 +0200	[thread overview]
Message-ID: <20260616093527.388679-1-valentin@gagarin.work> (raw)
In-Reply-To: <20260608164938.290202-1-valentin@gagarin.work>

After some out-of-band discussion I decided to make the navigation
structure more literal.  That has the advantage of being slightly less
source code and slightly smaller output, but more importantly it seems
to degrade more gracefully and less noisily for limited clients, such as
screen readers and text browsers.

Since the overall change is really large and the changes may be hard to
spot, here's the diff against v2.

diff --git a/Documentation/_includes/breadcrumb.html b/Documentation/_includes/breadcrumb.html
index f759807..3b93128 100644
--- a/Documentation/_includes/breadcrumb.html
+++ b/Documentation/_includes/breadcrumb.html
@@ -4,20 +4,18 @@ SPDX-FileCopyrightText: 2026 Valentin Gagarin <valentin@gagarin.work>
 {% endcomment %}
 {%- unless page.url == '/' -%}
 <nav aria-label="Breadcrumb">
-  <ol>
-    <li><a href="/">Spectrum</a></li>
-    {%- assign parts = page.url | split: '/' -%}
-    {%- assign acc = '' -%}
-    {%- for part in parts offset: 1 -%}
-      {%- assign acc = acc | append: '/' | append: part -%}
-      {%- assign parent_url = acc | append: '/' -%}
-      {%- if parent_url == page.url -%}{%- continue -%}{%- endif -%}
-      {%- assign parent = site.pages | where: 'url', parent_url | first -%}
-      {%- if parent %}
-    <li><a href="{{ parent.url }}">{{ parent.title }}</a></li>
-      {%- endif -%}
-    {%- endfor %}
-    <li aria-current="page">{{ page.title }}</li>
-  </ol>
+  <a href="/">Spectrum</a>
+  {%- assign parts = page.url | split: '/' -%}
+  {%- assign acc = '' -%}
+  {%- for part in parts offset: 1 -%}
+    {%- assign acc = acc | append: '/' | append: part -%}
+    {%- assign parent_url = acc | append: '/' -%}
+    {%- if parent_url == page.url -%}{%- continue -%}{%- endif -%}
+    {%- assign parent = site.pages | where: 'url', parent_url | first -%}
+    {%- if parent %}
+    / <a href="{{ parent.url }}">{{ parent.title }}</a>
+    {%- endif -%}
+  {%- endfor %}
+  / <span aria-current="page">{{ page.title }}</span>
 </nav>
 {%- endunless -%}
diff --git a/Documentation/_includes/footer_custom.html b/Documentation/_includes/footer.html
similarity index 82%
rename from Documentation/_includes/footer_custom.html
rename to Documentation/_includes/footer.html
index db29f82..d0e2c0b 100644
--- a/Documentation/_includes/footer_custom.html
+++ b/Documentation/_includes/footer.html
@@ -3,18 +3,19 @@ SPDX-FileCopyrightText: 2020 Alyssa Ross <hi@alyssa.is>
 SPDX-License-Identifier: CC-BY-SA-4.0 OR GFDL-1.3-no-invariants-or-later
 {% endcomment %}
 <p>
-<small>Permission is granted to copy, distribute and/or modify this
+Permission is granted to copy, distribute and/or modify this
 document under either the terms of the
 <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative
 Commons Attribution-ShareAlike 4.0 International License</a>, or the
 <a href="https://www.gnu.org/licenses/fdl-1.3.html">GNU Free
 Documentation License, Version 1.3</a> or any later version published
 by the Free Software Foundation; with no Invariant Sections, no
-Front-Cover Texts, and no Back-Cover Texts.</small>
+Front-Cover Texts, and no Back-Cover Texts.
 
-<p><small>
+<nav aria-label="Footer">
 <a href="/sitemap.html">Sitemap</a>
+&middot;
 <a href="https://spectrum-os.org/git/spectrum/tree/Documentation/{{ page.path }}">Source code for this page</a>
+&middot;
 <a href="/impressum.html" lang="de">Impressum</a>
+</nav>
diff --git a/Documentation/_includes/sitemap.html b/Documentation/_includes/sitemap.html
index 51c5bb0..26e96ec 100644
--- a/Documentation/_includes/sitemap.html
+++ b/Documentation/_includes/sitemap.html
@@ -33,7 +33,9 @@ which we assume if it is constructed by a directory and contains an index file.
     `assign` is page-global.  A recursive include below may have overwritten `prefix`.
     {%- endcomment %}
     {%- assign prefix = include.prefix | default: default_root -%}
-    {%- assign suffix = p.url | remove_first: prefix -%}
+    {%- 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 -%}
@@ -51,6 +53,7 @@ which we assume if it is constructed by a directory and contains an index file.
       {%- endif -%}
     </li>
     {%- endif -%}
+    {%- endif -%}
   {%- endfor -%}
 {%- endcapture -%}
 {%- assign trimmed = inner | strip -%}
diff --git a/Documentation/_layouts/page.html b/Documentation/_layouts/page.html
index f2cf0f6..4eba50d 100644
--- a/Documentation/_layouts/page.html
+++ b/Documentation/_layouts/page.html
@@ -24,5 +24,5 @@ SPDX-FileCopyrightText: 2026 Valentin Gagarin <valentin@gagarin.work>
 
 {{ content }}
 
-{% include footer_custom.html %}
+{% include footer.html %}
 </html>
diff --git a/Documentation/contributing.html b/Documentation/contributing.html
index 6e5fc00..9bb21d8 100644
--- a/Documentation/contributing.html
+++ b/Documentation/contributing.html
@@ -22,8 +22,8 @@ If you're interested in contributing code to Spectrum, you
 can <a href="https://spectrum-os.org/git/">find</a> the source
 repositories online.
 
-If you've made changes you'd like to be included
-in the official Spectrum distribution, please send patches to the
+If you've made changes you'd like to be included in the official
+Spectrum distribution, please send patches to the
 spectrum-devel <a href="https://lists.spectrum-os.org/mailman3/lists/devel.spectrum-os.org/">
 mailing list</a>
 (<a href="mailto:devel@spectrum-os.org">devel@spectrum-os.org</a>).
diff --git a/Documentation/style.css b/Documentation/style.css
index 44060b3..ae617c5 100644
--- a/Documentation/style.css
+++ b/Documentation/style.css
@@ -26,16 +26,8 @@ var {
     background: yellow;
 }
 
-nav[aria-label="Breadcrumb"] ol {
-	list-style: none;
-	padding: 0;
-	display: flex;
-	flex-wrap: wrap;
-}
-
-nav[aria-label="Breadcrumb"] li + li::before {
-	content: "/";
-	padding: 0 0.5em;
+footer {
+	font-size: small;
 }
 
 :root {

-- 
2.54.0


  parent reply	other threads:[~2026-06-16  9:36 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 16:49 [PATCH 0/3] Documentation: render all pages in one style Valentin Gagarin
2026-06-08 16:49 ` [PATCH 1/3] Documentation: align Jekyll page style to rest of website Valentin Gagarin
2026-06-08 16:49 ` [PATCH 2/3] Documentation: drop Just the Docs Valentin Gagarin
2026-06-08 16:49 ` [PATCH 3/3] Documentation: uniform navigation across all pages Valentin Gagarin
2026-06-08 16:49 ` [PATCH 1/3] Documentation: align Jekyll page style to rest of website Valentin Gagarin
2026-06-09 11:45   ` Alyssa Ross
2026-06-10 12:12     ` Valentin Gagarin
2026-06-10 12:23       ` Alyssa Ross
2026-06-08 16:49 ` [PATCH 2/3] Documentation: drop Just the Docs Valentin Gagarin
2026-06-09 11:43   ` Alyssa Ross
2026-06-08 16:49 ` [PATCH 3/3] Documentation: uniform navigation across all pages Valentin Gagarin
2026-06-09 11:54   ` Alyssa Ross
2026-06-11  6:37 ` [PATCH v2 1/3] Documentation: align Jekyll page style to rest of website Valentin Gagarin
2026-06-11  6:37   ` [PATCH v2 2/3] Documentation: drop Just the Docs Valentin Gagarin
2026-06-11  6:37   ` [PATCH v2 3/3] Documentation: uniform navigation across all pages Valentin Gagarin
2026-06-12  8:44     ` Alyssa Ross
2026-06-12  8:27   ` [PATCH v2 1/3] Documentation: align Jekyll page style to rest of website Alyssa Ross
2026-06-16  9:35 ` Valentin Gagarin [this message]
2026-06-16  9:35   ` [PATCH v3 " Valentin Gagarin
2026-06-16 11:49     ` Alyssa Ross
2026-06-16 12:02       ` Valentin Gagarin
2026-06-17 10:48     ` Alyssa Ross
2026-06-16  9:35   ` [PATCH v3 2/3] Documentation: drop Just the Docs Valentin Gagarin
2026-06-17 10:48     ` Alyssa Ross
2026-06-16  9:35   ` [PATCH v3 3/3] Documentation: uniform navigation across all pages Valentin Gagarin
2026-06-16 12:01     ` Alyssa Ross
2026-06-17 10:48     ` Alyssa Ross
2026-06-16 12:01   ` [PATCH v3 0/3] Documentation: render all pages in one style Alyssa Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260616093527.388679-1-valentin@gagarin.work \
    --to=valentin@gagarin.work \
    --cc=devel@spectrum-os.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).