-
Notifications
You must be signed in to change notification settings - Fork 140
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
Deletes the archive pages from the Document's quick jump. #75
Comments
I've tried this code but it doesn't work. I don't know why, I'm not very familiar with the Liquid language. |
Did you try with a lowercase |
Still not working. I printed the |
okay so the next thing to try is to surround the path_segment with some character (e.g., |
I have successfully fixed this bug with the following code: <!-- /pages/docs.md -->
<div class="section-index">
<hr class="panel-line">
{% for post in site.docs %}
{% assign path_segments = post.url | split: "/" %}
{% if path_segments[2] != "Archive" %}
<div class="entry">
<h5><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h5>
<p>{{ post.description }}</p>
</div>
{% endif %}
{% endfor %}
</div> It looks like the slice filter does not return a string (probably an Array). |
Perfecto! So is this something you want to contribute here, or were you just asking for help? Either way, glad you figured it out! |
Thanks. I will close this issue. It is welcome to merge it into the repository if you agree with the idea. |
Document pages will automatically render all pages in
site.docs
through Jekyll, which also contains pages under Archive. This causes a lot of duplication of these quick jumps, especially if there are more versions. I recommend filtering this out with an if statement.Like this:
The text was updated successfully, but these errors were encountered: