I’m aiming to use 3 collections, talks, teaching and projects, and have set up talks and teaching so far, where the pagination itself works and calls different collections. I have _teaching and _talks folders with all the collection md files.
I’m getting an odd behaviour where the first index that jekyll generates it then uses for both collections. See screenshots below from localhost build. In the case shown below, the Teaching page shows the Talks page header and lead text. This isnt browser cache, its in the generated html index for teaching.
- Initially I had html files in the root calling the collection pages: teaching.html and talks.html. This seemed to work well, its based on the Daniel Sieger tutorial.
- Then I tried using includes for the collection calls, it made no difference.
- Then I tried the recommended method of folders without the leading underscore and index.html inside (with nothing in those files). It made no difference.
- I have also tried messing about with the pagination setting for name of index file - but this isnt relevant to this issue (its for the generated pages only afaik.)
- I have tried different ways of adding a paginate path to front matter pagination attributes -
paginate_path: "/teaching/page:num"
andpermalink: /:num/
in the teaching.html and talks.html files. It makes no difference. - I have added empty index.md files to the underscore folder collections folders, but again, I don’t think this is relevant to this problem.
It’s exactly the same problem as this entry on SO from 2020:
https://stackoverflow.com/questions/64977602/how-to-paginate-multiple-collections-in-jekyll
One of the later comments on that thread refers to page.content being overwritten -
Running into the same issue, but looking into details I find that paginator updates, but page.content of the respective page is always overwritten with the first one. So different paginators on each of the pages, but the same page.content - very strange. – squarespiral
CommentedJun 11, 2021 at 14:12
Screenshots:
- The TALKS page, with header and lead text.
- The TEACHING page - includes the Talks header and lead text.
Tech info:
Including the Gemlock to show the build:
PATH
remote: .
specs:
minima (3.0.0.dev)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
colorator (1.1.0)
concurrent-ruby (1.3.4)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.17.0-x64-mingw-ucrt)
forwardable-extended (2.6.0)
http_parser.rb (0.8.0)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
jekyll (4.3.4)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-paginate-v2 (3.0.0)
jekyll (>= 3.0, < 5.0)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.1.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.3.9)
rouge (3.30.0)
safe_yaml (1.0.5)
sassc (2.4.0)
ffi (~> 1.9)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.6.0)
wdm (0.2.0)
webrick (1.9.1)
PLATFORMS
x64-mingw-ucrt
DEPENDENCIES
bundler
jekyll-paginate-v2
jekyll-sass-converter (~> 2.0)
minima!
wdm (>= 0.1.0)
BUNDLED WITH
3.4.9
```![2024-12-15 10_01_18-localhost_4000_pen-oer_talks_ - Brave|642x500](upload://9eSDCBrWZqTVLR1b1TlLsiKTCG.png)