Skip to content

Commit 55acde2

Browse files
Fix Rhea example pages not having pagination
1 parent e343f86 commit 55acde2

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

_includes/examples-table.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@
5353
.map((li) => li.querySelector('a'))
5454
.filter((a) => a && /\.html?$/.test(a.getAttribute('href') || ''));
5555

56-
// Only resource-index pages have an "Examples" list of links like this;
57-
// skip anything else (homepage grid, keyword lists on example pages).
58-
if (!entries.length || entries.length !== items.length) {
59-
return null;
60-
}
61-
6256
const table = document.createElement('table');
6357
table.className = 'examples-table';
6458

@@ -348,7 +342,11 @@
348342
}
349343

350344
document.addEventListener('DOMContentLoaded', () => {
345+
const header = document.querySelector('#examples');
351346
const lists = document.querySelectorAll('.site-main__inner > ul');
347+
if (header === undefined || header === null){
348+
return;
349+
}
352350
Array.prototype.forEach.call(lists, (list) => {
353351
const built = buildTable(list);
354352
if (!built) {

0 commit comments

Comments
 (0)