I've worked with Rails before but I'm having issues working my way around configuring the layout that I`m using.
I am using the Twitter theme, and under _includes/themes/_layouts/default.html
, I want to be able to link to other pages under the nav as opposed to the default. I understand that the pages are given by the site.pages
variable but I don't know how to modify it.
<ul class="nav">
{% assign pages_list = site.pages %}
{% assign group = 'navigation' %}
{% include JB/pages_list %}
</ul>
I want to link the about.html
page that I have created using rake page name="about.md"
to a subtopic under the navigation class as listed above.
In addition, how do I print out debugging statements? In ERB templating, I was simply able to print to the log, however something like {{print "Hello"}}
is illegal, so what is the preferred way of doing this?
What you should do, I think, is add group: navigation
to your yaml header of about.md
, and remained defalut navbar code unchanged. It put the about.md
to the navgation
group, {% assign group = 'navigation' %}
, this code tell use navgation
group generate navbar links
about.md
yaml header like this
---
layout: page
title: About
header : About
group: navigation
---