Skip to content

image shortcodes erroneously modify image source URLs #503

Description

@axelkar

System information

zola 0.20.0
tabi 1bb3343

Expected behaviour

The image shortcodes should pass the src argument as-is to the img element, while also keeping support for the image width and height.

Actual behaviour

Tabi gives the colocated path without the language prepended to image elements. When there is no default-language page in the same directory as an image, the image is inaccessible.

Steps to reproduce

zola init
echo "[languages.fi]" >> config.toml
mkdir -p content/foo
echo -e "+++\n+++\n" > content/foo/index.fi.md
echo test > content/foo/asset.txt
zola build
ls public/foo/asset.txt # as imported when raw_path=false, does not exist
ls public/fi/foo/asset.txt # as imported when raw_path=true, exists
echo -e "+++\n+++\n" > content/foo/index.md
zola build
ls public/foo/asset.txt # as imported when raw_path=false, exists
ls public/fi/foo/asset.txt # as imported when raw_path=true, exists

Additional context

When Zola can handle the path given to image elements, it can change its logic independent of Tabi's. In the future, it may be better to use public/foo/asset.txt in all language versions of the foo page.

Final checklist

  • I've checked that the issue isn't already reported.
  • I've tested with the latest version of tabi to check if the issue has already been fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions