github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

madx / honk

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 11
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (2)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (2)
    • 0.2
    • 0.1
Sending Request…
Click here to lend your support to: honk and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

my blogging engine - sinatra + yaml — Read more

  cancel

http://yapok.org/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

add meta link for feeds [reported by skateinmars] 
madx (author)
Fri Jul 24 10:24:50 -0700 2009
commit  742ff9ce2e8d00436fb976b9c648194dda27d34b
tree    506d15953338f5fae7055f999c4545ec1f429cbc
parent  69b545d68ac84597940e83ef6fa907ab66de2aec
honk /
name age
history
message
file .baconrc Loading commit data...
file CHANGELOG
file LICENSE Fri Mar 06 13:02:08 -0800 2009 fixed date in the license [madx]
file README.textile Wed May 27 07:57:16 -0700 2009 fixing README instructions for current version [madx]
file VERSION Wed May 27 15:24:45 -0700 2009 version 0.2 -- the real one [madx]
file honk.thor
directory lib/
file run_specs
directory spec/
README.textile

Honk

A minimalistic, text-based blogging engine.

Features

  • Posts,
  • Comments,
  • Tags,
  • That’it.

Requirements, install & setup

You’ll need Sinatra and, optionnaly,
Thor.

Thor is used for convenience scripts (regenerating the taglist, managing your
posts) so I strongly recommend that you install it. The formatter may be used to
ease the editing of your posts. Honk will treat the contents as raw HTML if you
don’t specify a formatter (see below).

Once you’ve got this, clone this repository or grab a tarball and extract it
where you want to install your blog. Run ruby honk.rb to start your blog.

You can run thor script:bootstrap to build the default files and start
editing them right away!

Usage

Honk relies on two main files, plus your posts and the comments for your posts,
which will be automatically generated.

Index

The index.yml files contains a sequence of mappings in which each key is a
short name for your post, and the value is the path for your post (relative to
Honk’s root) or ~ to automatically build the path.

--- !honk.yapok.org,2009/Index
- my_first_post: my_first_post.yml
- another_one: another_one.yml
- alias: this_post_is_aliased.yml
- magic: ~ # will map to magic.yml
- more_magic: foo_~.yml # will map to foo_more_magic.yml

The way Honk works allows you to write posts without publishing them. They will
be available only when you add them to the index. Be careful that it is a
sequence, which mean it’s ordered: the most recent post goes at the bottom of
this file.

Tags

Next, the tags.yml file is simply a mapping that associates each tag with a
list of posts.

Here’s an example tags.yml

--- !honk.yapok.org,2009/Tags
a_tag:
  - a_post
another_one:
  - a_post

Posts

Posts are stored in YAML files as well, the format is self-explanatory enough:

--- !honk.yapok.org,2009/Post
:title: A post about something
:tags:
  - miscellaneous
  - another tag
:timestamp: 2009-01-27T21:42:21+01:00
:commentable: yes
:contents: |-
  <p>This is my <strong>first post</strong></p>
  <p>As you can see I write raw HTML</p>

Remember that in order to publish a post, you have to add it to the index.yml
file!

Comments

Comments are stored in one file per post, so if you have a post stored in
my_post.yml, the comments file would be my_post.comments.yml. The format is
rather simple too:

--- !honk.yapok.org,2009/Comment
:author: Jonh Doe
:email: john@doe.com
:website: http://johndoe.com/
:timestamp: 2009-01-27T21:42:21+01:00
:contents: |-
  Wow dude, that post is awesome!

The comments file is a stream of comments, from the oldest to the latest.

Configuring and tweaking

The basic configuration is done through the Honk.setup block it lets you define
some basic parameters for your blog such as pagination. Just open the config.rb
and follow the instructions.

Configuration options

  • paginate: defines how many posts are showed per page.
  • root: tells honk where to find the posts, index and tags files, default is
    the same dir as you blog, but you can change this to put your content
    elsewhere.
  • comment_filter: a proc that returns the filtered text for a comment. This is
    useful for escaping HTML, allowing formatting, etc.
  • meta: defines metadata for your blog such as author’s name, email, a
    title…

If you want more tweaking, you can still hack the source, it’s open.

Theme & layout

Of course, Honk’s layout can be overriden. Just take a look at
public/master.css and views/.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server