Skip to content

fix: stop fetching remote images at build time - #93

Merged
alexandear merged 1 commit into
revive-lint:masterfrom
alexandear-org:fix/strip-remotes
Oct 15, 2026
Merged

alexandear merged 1 commit into
revive-lint:masterfrom
alexandear-org:fix/strip-remotes

Conversation

@alexandear

Copy link
Copy Markdown
Member

The lotusdocs image render hook pipes every Markdown image through resources.GetRemote, so the site build depends on each remote host: a 429 from deepwiki.com was enough to fail it after a 1m retry timeout.

Override the hook to leave remote images to the browser and keep the theme's behaviour (inline SVG, intrinsic width/height) for local ones.

Fixes https://github.com/revive-lint/revive.run/actions/runs/38723619107/job/116383982324:

Generated docs/rules.md (106 sections) and docs/documentation.md; copied 7 assets.
hugo: downloading modules …
hugo: collected modules in 11309 ms
Start building sites … 
hugo v0.165.0-76a5e1880ab46688155b02e99bab9be2a6134492+extended linux/amd64 BuildDate=2026-08-12T14:26:28Z VendorInfo=gohugoio

Total in 69511 ms
ERROR error building site: render: [en v1.0.0 guest] failed to render pages: render of "/home/runner/work/revive.run/revive.run/content/docs/documentation.md" failed: "/home/runner/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/colinwilson/lotusdocs@v0.3.0/layouts/docs/single.html:5:11": execute of template failed: template: docs/single.html:5:11: executing "main" at <.Content>: error calling Content: "/home/runner/work/revive.run/revive.run/content/docs/documentation.md:7:38": "/home/runner/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/colinwilson/lotusdocs@v0.3.0/layouts/docs/_markup/render-image.html:7:38": execute of template failed: template: docs/_markup/render-image.html:7:38: executing "docs/_markup/render-image.html" at <resources.GetRemote>: error calling GetRemote: Get "https://deepwiki.com/badge.svg": retry timeout (configured to 1m0s) fetching remote resource: 429 Too Many Requests

The lotusdocs image render hook pipes every Markdown image through
resources.GetRemote, so the site build depends on each remote host: a 429
from deepwiki.com was enough to fail it after a 1m retry timeout.

Override the hook to leave remote images to the browser and keep the
theme's behaviour (inline SVG, intrinsic width/height) for local ones.
@alexandear
alexandear merged commit 472071e into revive-lint:master Oct 15, 2026
1 check 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