-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Books feature #41
base: gh-pages
Are you sure you want to change the base?
Books feature #41
Conversation
This looks great! |
Quick response: heck yeah! I've got a busy week but I'll try to make some time to check it out a bit more. It looks like a very promising start! |
Good to hear I'm at least in the right ballpark 🥳 |
Hey @rathgar - I've been having a play around with this PR and it took me a while to realise I needed to include the following in my _config.yml:
Might be worth including this update in the PR. Also do you have any examples of a book you've implemented? I've gotten the basics of one working but am not sure what all the properties are to include in the front matter. It's looking good though - I'm keen to start using this more! |
Thanks for catch! I'm so careful not to commit my For a book eg ---
layout: book
title: Perfect Loaf
cover: perfect-loaf.jpg
description: How to bake the perfect loaf of bread.
covernotes: A longer covernote exlainging the purpose of the book.
author: rue-turner
---
<p>Any HTML you fancy.</p> In a recipe, add the following: books: [perfect-loaf] Be sure to add the author to the That's it really. The books are html with front matter so can contain any HTML you fancy, including styling if you need it. |
This is an idea of how books might work. The hope is that it will provoke discussion and help drive towards what might be useful (if this does turn out to be useful at all.)
They way I have it setup in this example is to use a
books
collection with its own layout that has no exciting structure. The author is free to lay it out as they see fit and either inject recipes using a standard lookinginclude
(not yet written) or just write them out in their own way. The book can be quite free-form in this manner as I think @clarklab was keen on. The clever part comes form the recipe end.In recipes you can mark them as being part of any number of books.
This keeps the association with the recipe and makes life a bit easier. When viewing a recipe you can see which books it is in:
Also, at the bottom of the book you can see an index of the recipes that refer to it, and a list of books by the same author:
Authors are identified in
_data/people.yml
- which no doubt will find uses elsewhere. We could even use them as the 'chef' of a recipe?As I say, although very much a functioning idea, this is still just an idea and open to ravaging change.