bennetthardwick / simple-dev-blog-zola-starter

A simple dev-blog theme for Zola.
MIT License
49 stars 23 forks source link

Allow absolute static_thumbnail #9

Closed Chemaclass closed 3 years ago

Chemaclass commented 3 years ago

I just realized, what if you would like to point to an image/thumbnail that is in another domain? Currently, it's not possible, because it's always prefixing with the current website (using get_url(path=page.extra.static_thumbnail)).

Proposal

Check if the static_thumbnail contains the absolute URL (checking http:// or https://), and in case it is an absolute path, then use it as it is, without using the get_url() function. Otherwise, fallback as the previous behavior.