Re: [nesta] menu.txt
- From:
- Ben Burdick
- Date:
- 2010-06-03 @ 23:47
Hi Graham,
Thanks for your reply and the suggestions. As I mentioned in my comment,
I've only just begun to play with nesta and certainly look forward to
digging in a bit more and possibly even looking into making a plugin to
accomplish this as I build things out and get a better idea of what I am
after. So thanks for the tips on that! I think I'll dig into that a bit
more this weekend. I'll let you know if I come up with anything
substantial.
I don't really have any examples or hard requirements at the moment - but
what I do know is I'd like more control over the content in the sidebar
aside from just having a linkable category list. Like how Oscar Del Ben
has added an 'about' section to his @ http://oscardelben.com/blog or how
wordpress lets you drop in pieces that add to your sidebar. While it is
very easy to customize already, being able to just drop some markdown
files into a sidebars/ directory I think would lower the barrier of entry
even more.
Anyway, it was just a thought I had that I figured I'd share - I admit
that it wasn't a completely fleshed out thought though, I'm still
dissecting nesta at the moment and I do like the idea of approaching this
with a plugin.
Great work with Nesta by the way, I'm really enjoying what it has to offer.
Cheers,
Ben
On Jun 3, 2010, at 7:35 PM, Graham Ashton wrote:
> On 1 Jun 2010, at 23:30, Ben Burdick wrote:
>
>> Been tinkering with Nesta today, considering it for an upcoming project
and I was wondering if there is any documentation on how to use menu.txt?
I see its most basic usage from the sample content, but am curious how
powerful it can be and what 'automagic' aspects it has (if any) aside from
category links.
>
> Hi Ben. Sorry I didn't get back to you sooner on this, I've been busy
with a product launch.
>
> I've never really thought about how the sidebar stuff could work beyond
menu.txt, but I agree that it's currently rather basic. Category links is
really all it can do right now.
>
> In a comment on the site (http://effectif.com/nesta#comment-53505575) you said:
>
>> I was thinking of some way to make the sidebar easier to customize and
think that a good feature to add might be a sidebars/ directory. Here you
could put .mdown files that get parsed, cached and loaded into the
sidebar. Order is important when it comes to sidebars, so it would be nice
to have some sort of ordering system, perhaps a naming convention similar
to how apache would load vhost files. If you're not familiar, files like
"001-somesite" and "002-somesite" could exist in a directory and it would
load them in numerical order. So the 001 config would always come first.
>
> I'm up for giving Nesta a bit more intelligence, so long as it stays
really simple for people to grasp. At the moment I think the barrier to
entry is relatively low - you can be quite lazy, avoid most of the docs,
and still get a site up and running fairly easy.
>
> This kind of thing might be perfect for a plugin. I've not written
anything about how to do it yet, but a theme is basically a plugin.
>
> I think the way I'd approach this with the current code base would be by
modifying the layout. You can drop a new layout into local/views to
override the default layout. The layout could then pull in partials (also
stored in local/views) that handle side bars.
>
> The local/views stuff is covered here: http://effectif.com/nesta/design
>
> I realise that might not cover your requirements though. Do you need to
show different sidebars in different orders on different pages? Are there
any sites you could point me to that have the kind of side bar flexibility
that you need?
>
> What were you thinking of putting in your sidebars/ files? Would it just
be a bit of Markdown, or do you need to put HTML/Haml in them? Have you
any example sites I could have a look at to get a better feel for what
you'd like to achieve?
>
> Cheers,
> Graham
How to hack the side bar (was Re: menu.txt)
- From:
- Graham Ashton
- Date:
- 2010-06-22 @ 14:04
On 4 Jun 2010, at 00:47, Ben Burdick wrote:
> I don't really have any examples or hard requirements at the moment -
but what I do know is I'd like more control over the content in the
sidebar aside from just having a linkable category list. Like how Oscar
Del Ben has added an 'about' section to his @ http://oscardelben.com/blog
or how wordpress lets you drop in pieces that add to your sidebar. While
it is very easy to customize already, being able to just drop some
markdown files into a sidebars/ directory I think would lower the barrier
of entry even more.
Hi Ben.
I've made quite a few improvements to Nesta over the last few days, and
I've just pushed a change which was largely inspired by your question.
I wanted to be able to insert an "About" section into my sidebar without
having to override any of the default code that displays the category menu
or adds the social icons.
Here's the default sidebar code (in views/sidebar.haml):
#sidebar
= haml :categories, :layout => false
= haml :feed, :layout => false
= haml :social, :layout => false
I wanted to list some open source projects above the list of categories,
and to stick an "About" section in above the social bookmarking icons.
I left the default sidebar template alone and created
local/views/sidebar.haml, which gets used instead. It still uses the
categories, feed and social templates from the main ./views directory, but
takes control over where they get called.
http://github.com/gma/nesta/blob/effectif/local/views/sidebar.haml
You can see the result on http://effectif.com.
I think this is a great example of how I think we can keep the core code
base clean and simple and configure Nesta sites with templates in the
./local directory. Maybe I should write it up as a brief article...
Cheers,
Graham
Re: [nesta] How to hack the side bar (was Re: menu.txt)
- From:
- Ben Burdick
- Date:
- 2010-06-23 @ 00:09
Hey Graham,
That is excellent! Exactly what I was hoping for and much cleaner than my
proposed ideas. Great work, I will definitely be checking it out.
I agree too that an article on local would be great :)
Ben
On Jun 22, 2010, at 10:04 AM, Graham Ashton wrote:
> On 4 Jun 2010, at 00:47, Ben Burdick wrote:
>
>> I don't really have any examples or hard requirements at the moment -
but what I do know is I'd like more control over the content in the
sidebar aside from just having a linkable category list. Like how Oscar
Del Ben has added an 'about' section to his @ http://oscardelben.com/blog
or how wordpress lets you drop in pieces that add to your sidebar. While
it is very easy to customize already, being able to just drop some
markdown files into a sidebars/ directory I think would lower the barrier
of entry even more.
>
> Hi Ben.
>
> I've made quite a few improvements to Nesta over the last few days, and
I've just pushed a change which was largely inspired by your question.
>
> I wanted to be able to insert an "About" section into my sidebar without
having to override any of the default code that displays the category menu
or adds the social icons.
>
> Here's the default sidebar code (in views/sidebar.haml):
>
> #sidebar
> = haml :categories, :layout => false
> = haml :feed, :layout => false
> = haml :social, :layout => false
>
> I wanted to list some open source projects above the list of categories,
and to stick an "About" section in above the social bookmarking icons.
>
> I left the default sidebar template alone and created
local/views/sidebar.haml, which gets used instead. It still uses the
categories, feed and social templates from the main ./views directory, but
takes control over where they get called.
>
> http://github.com/gma/nesta/blob/effectif/local/views/sidebar.haml
>
> You can see the result on http://effectif.com.
>
> I think this is a great example of how I think we can keep the core code
base clean and simple and configure Nesta sites with templates in the
./local directory. Maybe I should write it up as a brief article...
>
> Cheers,
> Graham