Docs: use of pageEntry in pagination navigation
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- documentation
Research direction
Review the pagination navigation example in the issue, focusing on the loop variable pageEntry and the page.url reference in the anchor condition. Determine whether the example should use pageEntry.url; done means the documentation example consistently references the intended pagination entry.
Written by the indexing model from the issue text.
Description
In the example for implementing pagination navigation we have this nav code:
<nav aria-labelledby="my-pagination">
<h2 id="my-pagination">This is my Pagination</h2>
<ol>
{%- for pageEntry in pagination.pages %}
<li><a href="{{ pagination.hrefs[ loop.index0 ] }}"{% if page.url == pagination.hrefs[ loop.index0 ] %} aria-current="page"{% endif %}>Page {{ loop.index }}</a></li>
{%- endfor %}
</ol>
</nav>
We name entity of pagination.pages as pageEntry, but within the if condition of the anchor tag we use page.url instead of pageEntry.url. I am somewhat confused if this is intentional or it should be pageEntry.url instead of page.url. Please close the issue if this isn't a relevant question.
- Dominant language
- Nunjucks
- Stars
- 547
- Forks
- 726
- Avg merge
- 2h 23m
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 11ty/docs
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Suggestion for pagination/"before" documentation: clarify that only js front matter is supported Open
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·