kurtsson / jekyll-multiple-languages-plugin

I18n support for Jekyll and Octopress
MIT License
922 stars 203 forks source link

Reference image in page template #192

Closed JavierSegoviaCordoba closed 3 years ago

JavierSegoviaCordoba commented 3 years ago

I have the about template:

---
layout: page
title: About
permalink: /about/
image: '{{site.baseurl_root}}/images/60.jpg'
---

{% translate_file _pages/about.md %}

I tried:

image: '{{site.baseurl_root}}/images/60.jpg'

and

image: '/images/60.jpg'

It doesn't work for me, I am trying to avoid duplicate images, with

exclude_from_localizations: ["javascript", "images", "css", "scripts", "favicon.ico"]
favarete commented 3 years ago

What's the resulting URL from the {{site.baseurl_root}}/images/60.jpg? Does this URL make sense to you accordingly with the value on baseurl from your _config.yml? It's working on the default language at least or isn't working at all?

JavierSegoviaCordoba commented 3 years ago

The problem was on the HTML or javascript side so I haven't define there the URL, sorry, I am new in web development.