Skip to content

fix(site): serve attachments from static/docs/ so Zola renders all images - #53

Merged
GianRomani merged 1 commit into
mainfrom
fix/zola-static-attachments
Nov 25, 2026
Merged

GianRomani merged 1 commit into
mainfrom
fix/zola-static-attachments

Conversation

@GianRomani

Copy link
Copy Markdown
Owner

Summary

Fixes broken image rendering across the published Zola website (affecting Coffee logs, Coffee theory notes, and ML/Security notes).

Root Cause

When attachments was added to IGNORED_SECTION_DIRS in custom-site-assets/convert.py to hide the Attachments directory from sidebar navigation, convert.py stopped generating content/docs/attachments/_index.md. Because Zola ignores subdirectories under content/ that do not have an _index.md, no files inside content/docs/attachments/ were copied to public/.

Fix

  • Updated DocPath.copy() in custom-site-assets/utils.py to copy non-Markdown resource files into static/docs/<new_rel_path> instead of content/docs/<new_rel_path>.
  • Zola serves static/docs/... directly at /docs/attachments/..., matching all existing image links while keeping Attachments hidden from navigation.

@netlify

netlify Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for gianfree-notes ready!

Name Link
🔨 Latest commit 79c883e
🔍 Latest deploy log https://app.netlify.com/projects/gianfree-notes/deploys/6b0715e6bece507874536d3b
😎 Deploy Preview https://deploy-preview-53--gianfree-notes.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@GianRomani
GianRomani merged commit ed92f2f into main Nov 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant