I wonder if anyone could recommend a tool or system for browsing all my posts, and other collections according to key values.
I have thousands or posts and need to track down specific posts that:
- belong to a category
- have no category
- color: orange
- tag: grapes
My dream would be to filter a table view to quickly do group edits. I could find all the oranges fruits and do an edit on all key values - all fruit:orange add type:citrus for example.
Hmm… once I did something like to add a new front matter field to all posts belonging to category X or Y, and find all articles with category Z, remove the category and paste it to the tags field (so that Z was not a category anymore but a tag). I did that with vim/neovim, grep and REGEX. Grep for the search, Regex to find exactly what I needed and neovim to make to properly edit each file. I was curious about these three tools at the time and it was a pleasure to learn, though I am sure you could find the same functionality on another text editor (but afraid you cannot avoid the REGEX part).
Another (kind of) solution that comes in mind now, would be to make use of some fuzzy finder like Fzf.
What I said above doesn’t make sense, of course you can perform searches without learning REGEX, but still… in order to get that level of precision you’ve described you’ll will need to find a way to give detailed search patterns to be found (the most basic one I can think of, would be to insert/remove a comma after a category name, e.g.).
Anyway, this is probably something to be done from your text editor or OS, since jekyll is not that intrusive, and it (luckily AFAIK) doesn’t play smart.
@lsrdg Thanks for the reply. I am having some luck doing some things similar to what you mention. I’m tempted to look at a database solution to store articles in and have have some other utility push posts our from there to Jekyll and just let Jekyll do the site building but yet manage all post data elsewhere. When I come back to this project I’ll post my results.
Unless you already feel pretty comfortable with some database system, it seems pretty counter-intuitive to organize with a database a webpage that (at least in theory) doesn’t need one.
Just quickly coming back to your first post, maybe others could come with a better solution if you share which system and which tools are already in your workflow. E.g., if you are on a *nix system, you probably have a bunch of lightweight tools at your disposal that can deal with large amount of data.
There might be something for that but I can only think of some script that be ‘front matter aware’ and would be able to write to the files exactly where needed (and that’s why I doubt you can find one tool able to do everything, but who know…).