The maze book for programmers!
mazesforprogrammers.com

Algorithms, circle mazes, hex grids, masking, weaving, braiding, 3D and 4D grids, spheres, and more!

DRM-Free Ebook

The Buckblog

assorted ramblings by Jamis Buck

Enter Mephisto

19 September 2006 — The migration to a new blog engine is finished, and a new design is presented for the Buckblog — 1-minute read

Alright! I’ve finally finished my migration to Mephisto. I’ve tried to set up redirects and such so that all existing links and feeds will still work, but there are (no doubt) things I’ve missed. If you notice anything broken, please let me know.

With that migration out of the way, I should finally have some time to start blogging again. I’d like to start documenting some of the new features in Capistrano 1.2, among other things. Stay tuned!

Meanwhile, if you’ve been subscribed to my feed, you may want to update the link. I’m going through feedburner now, so you’ll need to click the “Articles” link in the sidebar on the right, and go through that whole song-and-dance. Many thanks!

Reader Comments

Congrats. How was the migration? I'm curious what went well and what didn't.
Why have You migrated to Mephisto? Is it better blog engine? Or beacouse of it's trendy? :)
Mike, the migration was pretty painless, actually. The hardest part was whipping up my own custom theme, and that was only hard because I had to actually write some of my own plugins to do what I wanted (like the archive list in the sidebar). The migration itself was very straightforward. aut0mat, naturally, I'm such a lemming that I only do what others are doing. ;) Seriously, though, I migrated because mephisto is lighter-weight, and because I could seem to keep typo running for more than a few days at a time without crashing.
Jamis, you should be able to do the side bar on edge with {{ for month in section.months }}, kinda like "this":http://svn.techno-weenie.net/projects/mephisto/trunk/themes/default/templates/archive.liquid.
Rick, correct me if I'm wrong, but it looks like section.months works simply by finding the earliest month and then filling an array of all months since then? Mine works by actually doing a single query to the DB, which tells you which months had posts and how many posts there were. It's less intense than asking the database for the count of posts for each month, esp. when you've got a sparse blog where not every month may have posts. Also, I didn't know about section.months. :) At any rate, it was a good excercise.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
module Buckblog
module SectionDrop
  class MonthDrop < Liquid::Drop
    attr_reader :section, :year, :month, :count

    def initialize(section, year, month, count)
      @section = section
      @year, @month, @count = year.to_i, month.to_i, count.to_i
    end

    def name
      "#{Date::MONTHNAMES[month]} #{year}"
    end

    def url
      path = [""]
      path << section.path unless section.path.blank?
      path += ["archives", year, month]
      path.join("/")
    end
  end

  def months_with_articles
    @months_with_articles ||= begin
      case Article.connection.adapter_name
      when "SQLite"
        month = "strftime('%Y-%m', published_at)"
      when "MySQL"
        month = "date_format(published_at, '%Y-%m')"
      else
        raise "#{Article.connection.adapter_name} is not yet supported here"
      end

      results = Article.connection.select_all(<<-SQL)
        select #{month} as month, count(c.id) as count_for_month
          from contents c, assigned_sections a
         where c.type='Article'
           and a.article_id = c.id
           and a.section_id = #{@source.id}
         group by month
         order by month DESC;
      SQL

      results.map do |row|
        year, month = row["month"].split(/-/, 2)
        MonthDrop.new(@source, year, month, row["count_for_month"])
      end
    end
  end
end
end
I notice the theme has changed, I will be creating an official version of the lucid theme soon, in the meantime a chap has created a port, see comments at this post http://thelucid.com/articles/2006/08/22/thelucid-typo-theme-phase-2
Jamie, the Lucid theme is one of the most beautiful I've seen, but I think I'm going to stick with the minimal theme I've got for now. Thanks!
Jamis -- That is rad, I think I'll add that to Mephisto.
Jamis -- don't make any decisions until you've seen the new release ;) Any feedback you have on feature requests/color schemes/enhancements is most welcome.