Getting started

William Morgan wmorgan-hobix-is-the-way at masanjin.net
Thu Sep 23 09:32:27 EDT 2004


Excerpts from Ben Giddings's mail of 22 Sep 2004 (EDT):
> A: Oh, well by default apache only parses .shtml files, not .html
> ones.  You'll either need to change hobix to generate shtml files, or
> change apache to parse .html files

Yeah, I had to figure out how to do this too. It's worth documenting
somewhere the installers will read. Something like:

"You'll have to make sure Apache will do server-side includes on the
 files that Hobix produces. The easiest way to do that is to add the
 following lines to httpd.conf:

 LoadModule includes_module /usr/lib/apache/1.3/mod_include.so
 AddType text/html .html
 AddHandler server-parsed .html"
 
> Q: Well anyhow, I can just look at the ruby files.  They're pretty
> easy to read.  Things are going pretty well, only, for some reason my
> "next" and "previous" links don't work.  They don't go to
> http://mysite/myblog/entry.html but to http://mysite/entry.html

This and the other path issues you describe, like site.css location,
_why has led me to believe will be fixed by default soon. For the time
being, I have this in my entry.html.quick:

entry_footer: |
  posted by <%= weblog.authors[entry.author]['name'] %> at
  <%= entry.created.strftime( "%l:%M %p" ) %>
  <% unless entry.section == "" %>
    to <a href="<%= entry.section_link %>"><%= entry.section %></a>
  <% end %>
  |
  <% if page.prev %>
    <a href="<%= weblog.link %><%= page.prev %>">prev</a>
  <% else %>
    (no prev)
  <% end %>
  |
  <% if page.next %>
    <a href="<%= weblog.link %><%= page.next %>">next</a>
  <% else %>
    (no next)
  <% end %>

which generates the correct links for next and prev. If you want the
section stuff to work, I have this in local.rb:

class Entry
  def section
    if self.id.count('/') == 0
      ""
    else
      self.id.gsub(/\/[^\/]*$/, "")
    end
  end
                                                                                 
  def section_link
    self.link.gsub(/\/[^\/]*$/, "")
  end
end

which plays very nicely with my section_map plugin. :) Also note the %l
instead of %I, because I'm crazy. 

-- 
William <wmorgan-hobix-is-the-way at masanjin.net>


More information about the Hobix-is-the-way mailing list