Skip to content

Commit 63d22a8

Browse files
committed
docs: serve the documentation screenshots next to the pages
The pages reference their screenshots as resources/gallery/<name>.png, relative to /docs/, but the build copied only the Markdown out of the source repository and dropped the folder, so every image was a broken link. Copy Documentation/resources beside the pages, without the kernel patches that already link to GitHub, and let a centred paragraph of screenshots sit as a row instead of the one-image-per-line rule the docs stylesheet applies to every image. Signed-off-by: ravindu644 <droidcasts@protonmail.com>
1 parent d4d2627 commit 63d22a8

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎.github/workflows/build-docs.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ jobs:
3434
rm -rf docs/content/
3535
mkdir -p docs/content
3636
cp -r /tmp/source/Documentation/. docs/content/
37+
# the pages reference screenshots as resources/gallery/<name>.png, relative to
38+
# /docs/, so the folder has to live next to the pages
39+
rm -rf docs/resources
40+
cp -r /tmp/source/Documentation/resources docs/resources
41+
rm -rf docs/resources/kernel-patches
3742
3843
- name: Install the build's Markdown renderer and highlighter
3944
run: pip install markdown-it-py mdit-py-plugins pygments

‎assets/css/main.css‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ html { scroll-padding-top: 80px; } /* an anchor lands below the 64px sticky nav,
182182
.docs-content li { margin-bottom: 4px; }
183183
.docs-content li > p { margin-bottom: 8px; }
184184
.docs-content img { display: block; max-width: 100%; height: auto; margin: 16px 0; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-lg); }
185+
/* a row of phone screenshots: the pages mark it up as <p align="center"> with 30% wide images */
186+
.docs-content p[align="center"] img { display: inline-block; width: 30%; margin: 8px 1%; vertical-align: top; }
185187
.docs-content hr { margin: 32px 0; border: 0; border-top: 1px solid var(--md-sys-color-outline-variant); }
186188
.docs-content hr + h2 { padding-top: 0; border-top: 0; } /* the page already drew its own rule */
187189
.docs-content :not(pre) > code { overflow-wrap: anywhere; } /* a long path wraps instead of widening a phone screen */

0 commit comments

Comments
 (0)