1

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?

Louis93
  • 3,843
  • 8
  • 48
  • 94

1 Answers1

1

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 navgationgroup, {% assign group = 'navigation' %}, this code tell use navgationgroup generate navbar links

about.md yaml header like this

---
layout: page
title: About
header : About 
group: navigation
--- 
Ever
  • 1,164
  • 1
  • 9
  • 13
  • Solid. I did something similar to work-around not knowing how to do this, but thanks, this is cleaner. – Louis93 Aug 13 '13 at 21:08