Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: image shortcodes work in zola serve but not zola build #36

Closed
goingforbrooke opened this issue May 11, 2023 · 1 comment
Closed

Comments

@goingforbrooke
Copy link
Contributor

Issue

When you add an image with Terminimal's image shortcode, it's visible locally (via zola serve) but not on GitHub Pages, where it's built via zola build in zola-deploy-action.

Misc.

I'm using the master branch of zola-deploy-action due to a breaking bug.

goingforbrooke added a commit to goingforbrooke/zola-theme-terminimal that referenced this issue May 11, 2023
This fixes an issue where images added with the `image` shortcode  are visible via `zola serve` but not `zola build`.

It works by prepending the site's base URL to image names so `http://127.0.0.1:1111/flower.png` and `https://www.awesomesite.com/flower.png` are both valid paths. Right now, only the former is a valid path.

Fixes pawroman#36.
goingforbrooke added a commit to goingforbrooke/zola-theme-terminimal that referenced this issue May 11, 2023
This fixes an issue where images added with the [`image` shortcode](https://github.com/pawroman/zola-theme-terminimal#image) are visible via `zola serve` but not `zola build`.

It works by [prepending](https://tera.netlify.app/docs#concatenation) the site's base URL to external image URLs so `https://www.awesomesite.com/flower.png` is just as valid as `http://127.0.0.1:1111/flower.png`.

External images are differentiated from internal images by the presence of `http` at the beginning of their URL.

Fixes issue pawroman#36.
@goingforbrooke goingforbrooke changed the title Image shortcode: Broken link in builds Bug: image shortcodes work in zola serve but not zola build May 11, 2023
@pawroman
Copy link
Owner

Fixed in #37

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

No branches or pull requests

2 participants