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

Useless back arrow #130

Open
HaukeCornell opened this issue Oct 10, 2022 · 2 comments
Open

Useless back arrow #130

HaukeCornell opened this issue Oct 10, 2022 · 2 comments

Comments

@HaukeCornell
Copy link

The theme has a back arrow at the top of pages. E.g., on the about page.

This back arrow link does not link back to the home page, but just refreshes the page.
Should we remove it? How?

@frothedoatmilk
Copy link

frothedoatmilk commented Apr 17, 2024

I've just ran into the same issue. I believe there's some issue with Jekyll's custom filters. A fix is to add your own _includes/back-link.html with the following:

{% assign back_page = site.pages | where: "name", page.back_page | first %}
{% if back_page != null %}
    <p class="back-link">
    <a href="{{ back_page.url | relative_url }}"><span class="back-arrow icon">{% include svg/back-arrow.svg %}</span>{{ back_page.short_title | default: back_page.title }}</a>
    </p>
{% endif %}

My only change from the original file is the assign back_page clause, which went from site.pages | find 'name', page.pack_page to what it is now. Digging further into Jekyll to see what's up here...

@frothedoatmilk
Copy link

Yeah, so the find method was introduced in (this release)[https://github.com/jekyll/jekyll/releases/tag/v4.1.0], but GitHub pages is locked to 3.9.5 as of writing. So I'm not positive what's happening in this call when find doesn't exist. But it ends up returning the current page. Would be best to revert this behavior to where syntax until GH updates it's jekyll version?

frothedoatmilk added a commit to frothedoatmilk/frothedoatmilk.github.io that referenced this issue Apr 17, 2024
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

2 participants