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

Remote URL sources not supported? #133

Open
rocc-o opened this issue Mar 19, 2023 · 3 comments
Open

Remote URL sources not supported? #133

rocc-o opened this issue Mar 19, 2023 · 3 comments

Comments

@rocc-o
Copy link

rocc-o commented Mar 19, 2023

I'm getting a 404 for images in this:

{# _components/site-hero.webc #}

<template webc:type="11ty" 11ty:type="njk">
  <div class="hero">
      <picture>
        <source
        media="(max-width: 280px)"
        sizes="(max-width: 640px) 100vw, 640px"
        srcset="
        https://files.cdn.com/assets/images/{{ folder_hero_images }}/webp/portrait/320.webp 320w,
        etc...
<link webc:bucket="hero" rel="stylesheet" href="../assets/css/components/hero.min.css">
</template>
{# index.njk #}

{% renderTemplate "webc" %}
<site-hero></site-hero>
<style @raw="getBundle('css', 'hero')" webc:keep></style>
{% endrenderTemplate %}

Does it have to do with issues/15?

@rocc-o
Copy link
Author

rocc-o commented Mar 19, 2023

It seems that Nunjucks variables are ignored. Shouldn't 11ty:type="njk" make them work?

@zachleat
Copy link
Member

Where is folder_hero_images defined? What URL is being requested?

@rocc-o
Copy link
Author

rocc-o commented Mar 23, 2023

folder_hero_images are defined in front-matter of each page; the URL requests images stored in Backblaze bucket and served with Cloudflare Transform Rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants