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

the ferh mystery #158

Closed
elotroalex opened this issue Apr 8, 2022 · 4 comments
Closed

the ferh mystery #158

elotroalex opened this issue Apr 8, 2022 · 4 comments

Comments

@elotroalex
Copy link

hi @untra. Thanks for this wonderful gem. Just ran into a glitch that I hadn't before. This is my 3rd site using your gem. In this glitch for some reason this code generates a ferh= inside my <a> element, instead of the expected href=. Needless to say, the links in the language switcher don't work:

<!-- LANGUAGE SELECTION -->                 
                
           {% for language in site.languages %}
              {% if language == site.active_lang %}{% else %}
                <li><a style="color: #0080ff;" {% static_href %} href="{% if language == site.default_lang %}{{ "" | absolute_url}}{{page.url | remove: "/"}}{% else %}{{"" | absolute_url}}{{ language }}{{page.url}}{% endif %}"{% endstatic_href %} >
                {{ language }}</a></li>
              {%endif%}
          {% endfor %}
@elotroalex
Copy link
Author

Interesting to note is that this only happens with $ jekyll build and not on $ jekyll serve. I'm kinda amazed by this glitch.

@elotroalex
Copy link
Author

elotroalex commented Apr 8, 2022

Ah. Just found that you write this explicitly wrong so that you can catch it with a post-processor:


# href writes out as ferh="..." explicitly wrong, to be cauaght by seperate processor for nonrelativized links

This means the static_href might not be functioning fully somehow in my line.

@untra
Copy link
Owner

untra commented Apr 9, 2022

Hello @elotroalex 👋 , thanks for the praise, and sorry for the bug.

Yeah that is supposed to be caught by the postprocessor, which honestly is not a good approach and is rather wasteful.

Interesting to note is that this only happens with $ jekyll build and not on $ jekyll serve. I'm kinda amazed by this glitch.

now that is curious; I wonder why the different jekyll build commands would do that? is the build process actually running polyglot and relativizing? If you shoot me a link to your project I'd be happy to look

@untra untra closed this as completed Jan 10, 2024
@lucmartinon
Copy link

Hello,
I would like to reopen this issue: I also have a project where I don't use jekyll serve, only jekyll build, since I have anyway an nginx server running to serve a data api. I seems to me that this is causing the static_href tag to not function.

I added a detailled example on a personal website that is in construction:

code here:
https://gitlab.com/lucmartinon/cnrs_pfas_web/-/blob/main/frontend/pages/about.fr.md?ref_type=heads

which is published here
http://vps-8ea64a15.vps.ovh.net/fr/about/

the link to /about is changed to /fr/about although it is in a static_href tag.

Beside this, fantastic plugin! thanks a lot!

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

No branches or pull requests

3 participants