Giter Club home page Giter Club logo

Comments (2)

webketje avatar webketje commented on September 22, 2024

Hi there, this is a known issue that I have documented in bullet 3 in #100 and proposed solutions for (the problem is that all of them are breaking changes that require a major release). But I'll have a look if I can already guarantee that the first "attached" (=first in the array) collection of a file is considered "primary" for next/previous references. All you have to do then is make sure that you specify the collection which you desire next/previous refs for to be first declared in the YAML or added through a plugin.

Another issue is that "primary collection" is not absolute: suppose a category "front-end" page which lists all posts with that category, then "front-end" is the "primary" category in that context instead of "blog".
Ideally I'd add a test case with 5 files and a mix of collections to also ensure first/last references work

from collections.

Melindrea avatar Melindrea commented on September 22, 2024

Thank you! I had not noticed that roadmap, so wasn't sure if it was a "me" thing.

And yeah, I completely understand how much needs to be redone for that to work. In my code I only had that one "primary" category of "blog" (after deciding that I didn't want the taxonomy of categories-and-tags, and tags seemed to fit the way I was using that bit of the collections the best).

for anyone that has a similar usecase as me, I went with going through the blogs-collection and comparing the index, next and prior to the length of the collection (which leads to a second thing of "next/previous depends a on how one sorts" it. If it's sorted with "newest first", then the element of index 0 has no "next" but has a "previous", whereas if it's sorted with the oldest first it has a previous, but not a next (which doesn't need to be addressed in the plugin, to be clear, this is mainly me giving hints for anyone needing to juryrig it and some of the pitfalls I found))

from collections.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.