Sunday, September 4, 2011

Creating a static site in ruby

Creating a static site is now very easy in ruby, Just need to install the gem.
The article about creating the site can be found at

After creating the site step by step as given in the article.
But I was not able to get the previous and next links in the show page/ main post page except the index as added in the article.

So added the following code to the _layouts/post.html
<div id="navigation">
  {% if page.previous %}
    <div id="previous">
      << <a href='{{ page.previous.url }}'>{{ page.previous.title }}</a>
  {% endif %}
  {% if %}
    <div id="next">
      <a href='{{ }}'>{{ }}</a> >>
  {% endif %}

And the navigation we need to add in the needs to be added with the whole url for example:
<div id="site-navigation">
<a href="http://localhost:4000/index.html"> Home Page </a> |
<a href="http://localhost:4000/archive.html"> Archive </a> |
<a href="http://localhost:4000/about.html"> About </a>

No comments:

Post a Comment