Hello,
I am in the early stages of researching Kirby.
One of the features I would like to build is a library of publications (mostly journal articles, some books, etc.). Each publication will have information like title, authors, DOI, page numbers, abstract, etc. I think most of that information would be easily handled by Kirby’s built-in fields. The part that I am not sure about is how to handle authors since I would like to be able to filter and display publications by author and make sure there are no duplicate authors.
The built-in fields that seem most closely related are the tags, structure, or users fields. However, I’m not entirely sure that any one of these fields have exactly what I need out of the box. Each publication may have many authors, and when adding a new publication there will probably be a mix of new authors and existing authors. Also, authors are just metadata, so it doesn’t make sense to have authors be users.
I have also come across this many-to-many plugin by JonasHolfeld: GitHub - jonasholfeld/kirby3-many-to-many-field: This plugin allows you to create many-to-many relationships between pages in Kirby and synchronizes them on both sides. Latest version also works with Kirby 4!, which I think would mean that I make publication pages and a author pages and then link them together through this custom relationships field. However, it seems a bit excessive to have a separate page for each author in this case.
The dynamic options features for the tags field seems quite powerful. Would it make sense to write some code that uses a JSON file to store authors and then I read and write to that JSON file so that it acts kind of like a database for the authors?
The last option I have come across is the Db class which could allow me to interact with a MySQL database and set up the relationships that I need inside that. I think Kirby 4 can now display Db information in the Panel, but I’m not certain about that.
I plan on building a tool to parse .ris files to automatically add publications to my library, in addition to doing it manually via the Panel. Also, down the road I would like to try and create a citation tool that works in the Writer field with a custom mark/node to cite publications from this library. In terms of scale, there will probably only be some hundreds of publication pages to start with, though that number does grow each year.
So, my question for you all is how would you recommend I approach this feature? Would the tags field be able to handle this? Would I need more complicated approaches like a database or the many-to-many plugin?
Thanks!