Closed bricebou closed 11 years ago
In the YAML format, you do need to indent each line of a multi-line text block in by two spaces. That should solve your issue for now. It is a bit annoying, but it's something I have been working on a fix for.
Ok, thanks for your answer, I've tried and it's working. But it seems to me that stacey with YAML is a bit more complex : I haven't manage to have a working category page as previously (I have a list of categories and sub-categories but it uses file names instead of category titles specified in category.yml files).
Do you have examples of "extended" templates ?
Thanks again.
Well, after "playing" a little more time with the git version of stacey, I've managed to understand a little bit more the way it works.
But I still don't have a satisfying category / sub-category page... I explain: I have a structure like that:
When I'm on the category page I'd like to see the sub-categories when it exists and the pages or only the pages. I cant show you online, but I've forked your repository and you can access it here : https://github.com/bricebou/stacey and the files for this display are there : https://github.com/bricebou/stacey/blob/master/templates/category.html and https://github.com/bricebou/stacey/blob/master/templates/partials/navigation/category-lists-projects.html
Is there a way to distinguish a category / sub-category folder from a page folder ?
Thanks again for Stacey and for your answers.
Thanks for the response Brice. Glad that solved your issue.
Perhaps it might be possible to check if there is more than one level of children to determine if it is a category or subcategory? Or it may even be simpler to set a variable on the parent page directly.
Thanks but I don't really understand what you are suggesting :/ Could you give me an example or more detailed informations ?
Thanks again.
I don't have any at hand, but can you not add something like a pagetype
variable?
Like:
title: Page Title
pagetype: category
content: etc...
This part I understood :) It's the template part that is more problematic ; I have to do something like that : {% if child.pagetype = "category" %} then test again the presence of a child and if this one is also a category ?
In my idea, it would be more "logic" to do something like that : while child and child = category only display category name and then projects. I mean, to have an automated recursive process.
I'm sorry for my limited understanding :/ and thanks again.
Hi,
I've just discovered Stacey and I find it really interesting but after playing with an older version (with txt files) I've discovered this git repository and it seems that I've an issue with line endings or HTML elements in my yml files ; for example the content above give me that message
An exception has been thrown during the rendering of a template ("Unable to parse file "./content/5.web/2.gmap/1.gmap2/2.poly-kml/gmap2.yml": Unable to parse line 3
If I put the content on a single line there is no problem anymore but you have to admit that it's far from easy to read your code anymore... :/ Maybe an issue with my saving parameters (I'm using Sublime Text, I save in UTF-8) ?
Thanks for your answers and for the work on stacey.
PS : Sorry if my english is not very clear :/