You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Thanks for developing this plug-in, I think is awesome.
I am having a problem when deploying my website in Github Pages, it is working to switch from the default language to the other one, but switching back to the default language does not works. When I tested locally in my computer locally it works perfectly.
i will really appreciate if you could help me to solve this, I have not been able to spot the issue.
Here is how I have defined my language switcher in my header.html:
{% assign lang = site.active_lang %}
{% for l in site.languages %}
<li><a {% if l == lang %}style="font-weight: bold;"{% endif %}
{% static_href %}href="{% if l == site.default_lang %}{{site.baseurl}}{{page.url}}{% else %}{{site.baseurl}}/{{ l }}{{page.url}}{% endif %}"{% endstatic_href %}>{{ l }} {% if l == 'en' %} <span class="flag-icon flag-icon-gbr"></span> {% else %} <span class="flag-icon flag-icon-esp"></span> {% endif %} </a></li>
{% if forloop.last == false %}<li role="separator" class="divider"></li>{% endif %}
{% endfor %}
And here is an example of the front matter for one of my pages:
Maybe the problem is the if/else inside the {% static_href %} tag. Try to invert this, like using the if/else outside. This is the only difference I can see from your code to mine. To check where I do this search for static_href inside this code. You can see it working in my demo site.
Thanks for your suggestion! I already changed. It still does not work and I don't understand why but at least I believe that the code looks much better now. Also, you have a very cool website template!! I might switch to using yours instead!! :)
Feel free to use it, it was created for academics. It is actually a fork of al-folio with multilingual support, but I am also currently a maintainer there, so I try to contribute there and keep my template in sync with the latest al-folio changes.
Another difference I just found is in our config files, where I also use lang_from_path: true for polyglot, so I can keep my files for different languages in different directories. Maybe that helps.
Hi! Thanks for developing this plug-in, I think is awesome.
I am having a problem when deploying my website in Github Pages, it is working to switch from the default language to the other one, but switching back to the default language does not works. When I tested locally in my computer locally it works perfectly.
i will really appreciate if you could help me to solve this, I have not been able to spot the issue.
Here is how I have defined my language switcher in my
header.html
:And here is an example of the front matter for one of my pages:
Just in case here is my project in case it helps and you have time to check it: https://github.com/alejandrocs98/multilingual-research-group-website
Thanks!
The text was updated successfully, but these errors were encountered: