• Stars
    star
    819
  • Rank 54,227 (Top 2 %)
  • Language
    Ruby
  • License
    Other
  • Created about 16 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Ruby on Rails blogging app for the fashionable developer. It's better than Mephisto or SimpleLog

This project is no longer actively developed

Both of the core collaborators have switched their blogs to Jekyll or similar static site generators. We’re still reviewing and merging PRs for Enki, but doing no active development ourselves.

Enki

A Ruby on Rails blogging app for the fashionable developer.

Preferences are for the masses. Any real coder knows the easiest and best way to customize something is by hacking code. Because you want your blog to be you, not bog standard install #4958 with 20 posts per page instead of 15. For this you need a clean, simple, easy to understand code base that stays out of your way. No liquid drops and templates hindering your path, no ugly PHP stylings burning your eyeballs.

Quick start

  git clone git://github.com/xaviershay/enki.git enki
  cd enki
  git checkout -b myblog # Create a new work branch
  bundle install         # Install all the required gems

  cp config/database.example.yml config/database.yml
  # Edit config/enki.yml and config/database.yml to taste

  # Next step needs libxml2 and libxslt1 and their headers
  # On Debian-based systems: apt-get install libxml2-dev libxslt1-dev
  # On Mac OS X: no action required

  rake secret # Paste output into place in config/initializers/secret_token.rb
  rake db:migrate
  rake            # Run tests
  rails server    # Start the server
  # Load http://localhost:3000/admin in your browser

Or for bonus points, fork Enki at github and clone that instead.

More info

Enki is a compact, easily extendable base for your blog. It does this by being highly opinionated, for example:

  • Public facing views should adhere to standards (HTML5, Atom)
  • /yyyy/mm/dd/post-title is a good URL for your posts
  • Live comment preview should be provided by default
  • Google does search better than you or I
  • You don’t need a plugin system when you’ve got decent source control
  • If you’re not using something more than just a basic username/password, you’re a chump
  • Hacking code is the easiest way to customize something

Setting up authentication

Enki uses OmniAuth for authentication. By default Enki supports Google OpenID Connect via the omniauth-google-oauth2 strategy and OpenID 2.0 via the omniauth-openid strategy. Should you wish to use a different form of authentication, you can implement any of the available OmniAuth strategies, or write your own strategy.

Using Google OpenID Connect for authentication

You will need a Google account, then:

  • Go to https://console.developers.google.com
  • Select (or create) your project
  • Click ‘APIs & auth’
  • Make sure ‘Contacts API’ and ‘Google+ API’ are enabled
  • Go to the Consent Screen, and provide an ‘Email address’ and ‘Product name’
  • Click on ‘Credentials’ under ‘APIs & auth’ and take note of your ‘Client ID’ and ‘Client secret’
  • Wait 10 minutes for changes to take effect

Create a new file called google_oauth2.yml in your config directory, add your ‘Client ID’ and ‘Client secret’ to the file thusly:

GOOGLE_CLIENT_ID: ADD_YOUR_CLIENT_ID_HERE
GOOGLE_CLIENT_SECRET: ADD_YOUR_CLIENT_SECRET_HERE

If you are deploying to Heroku, you will need to set the above as ENV variables instead of using google_oauth2.yml. For example:

$ heroku config:set GOOGLE_CLIENT_ID=my_client_id
$ heroku config:set GOOGLE_CLIENT_SECRET=my_client_secret

Open up config/enki.yml and make sure that the google_oauth2_email value matches the email address of your Google OpenID Connect identity.

Using OpenID 2.0 for authentication

Open up config/enki.yml and make sure that one or more of your OpenID identity URLs are included in the open_id value(s).

Upgrading to Enki 2016

As of January 2016, Enki no longer uses acts_as_taggable_on_steroids as it has been replaced with ActsAsTaggableOn. Commit 5e97796 contains database migrations that update the existing tag-related tables to be compatible with ActsAsTaggableOn. This is a non-destructive migration so any existing tag records in your database should be unaffected. However, just to be safe you may wish to back up your database before running bundle install and rake db:migrate to upgrade your Enki install.

Upgrading to Enki 2015

As of April 2015, Enki no longer uses the open_id_authentication gem. Commit ec85aef contains database migrations that remove both tables used by open_id_authentication and add a new table to store OmniAuth response information. Should you wish to keep any data that you may have currently stored in either the open_id_authentication_nonces or open_id_authentication_associations tables, retrieve this information before you run rake db:migrate to upgrade your Enki install.

URL path prefix

Enki can run your blog with a URL path prefix. For example, you can run it at example.com/blog instead of blog.example.com. You can do so with the RAILS_RELATIVE_URL_ROOT environment variable, set either before starting the server or in config/application.rb before Enki::Application. Uncommenting this line in config/application.rb will enable this behavior in all environments:

ENV['RAILS_RELATIVE_URL_ROOT'] = '/blog'

How it differs from Mephisto

Mephisto is feature packed and quite customizable. It can however be daunting trying to find your way around the code, which isn’t so good if you’re trying to hack in your own features. Enki strips out a lot of the features that you probably don’t need (multiple authors and liquid templates, for example), and focuses on keeping a tight code base that is easy to comprehend and extend.

How it differs from SimpleLog

Enki embodies much of the philosophy of SimpleLog, but does so in a style that is much more consistent with Rails best practices, making it easier to understand and hack the code.

Compatibility

Uses Ruby 1.9.3 or newer and Rails 4. Runs on MySQL or Postgres. Works on Heroku.

Contributors, these guys rock

git log | grep Author | sort | uniq

If you want to help out, try tackling an open issue. Please include specs for any fixes. Enki is by design feature light. Unless you feel very strongly your feature should be in core, add a link to your fork in the wiki instead.

License

GPL – See LICENSE

Admin design heavily inspired by Habari

More Repositories

1

rspec-fire

Obsolete - use verifying doubles in RSpec 3
Ruby
362
star
2

tufte-graph

a jQuery plugin that makes pretty bar charts
JavaScript
236
star
3

kronic

A dirt simple library for parsing and formatting human readable dates
Ruby
151
star
4

poniard

A dependency injector for Rails for writing clean controllers.
Ruby
112
star
5

db2s3

A rails plugin to backup Mysql to Amazon S3
Ruby
69
star
6

node-amqp

AMQP client for nodejs
JavaScript
52
star
7

consul-client

Ruby client gem for Consul HTTP API.
Ruby
43
star
8

jquery-enumerable

The only fully tested and API consistent enumerable plugin for jQuery (collect, inject and friends)
JavaScript
41
star
9

socialbeat

A proof of concept social crowd beat visualization thing, inspired by Giles Bowkett's RubyFringe talk.
Ruby
21
star
10

classifier

Classifier is a general module to allow Bayesian and other types of classifications.
Ruby
20
star
11

rust-puzzlefighter

A puzzle fighter/swordfighting clone.
Rust
19
star
12

kamel

Create KML files for tasty overlays on google earth and google maps
Ruby
18
star
13

writing

bits of writing
Ruby
16
star
14

haskell-servant-react-auth-example

Haskell
15
star
15

xtdo

Damnit, todo list MY WAY
Ruby
15
star
16

lesstile

Converts text formatted with an exceedingly simple markup language into HTML - perfect for comments on your blog.
Ruby
15
star
17

sandbox

Random bits and pieces
JavaScript
14
star
18

nytimes-slider

The hottest implementation of the nytimes slider you ever did see
JavaScript
14
star
19

dotfiles

My dotfiles
Perl
11
star
20

outage-party

The only incident response plan you'll ever need.
HTML
9
star
21

curlophone-orchestra

Uses bonjour to play a great symphony across many computers
Ruby
9
star
22

dominion-solitaire

An ncurses Dominion implementation with a focus on lightning quick goldfishing.
Ruby
9
star
23

xspec

XSpec is an rspec-inspired testing library that is written in a literate style and designed to be obvious to use, highly modular, and easy to extend. A concept piece.
Ruby
8
star
24

mnemonicker-wordlist

Lists of words.
7
star
25

sheets

Various Lilypond scores I have need for
LilyPond
7
star
26

gnucash2ledger

Convert GnuCash files to a format supported by the ledger command line application
Ruby
7
star
27

nested-attributes-demo

An example of how to use nested attributes with rails 3
Ruby
7
star
28

dm-checked-types

CHECK constraints and validations for your models
Ruby
6
star
29

factorio-layout-designer

JavaScript
6
star
30

buildhawk

Historical information about your build, on a webpage!
Ruby
6
star
31

factorio-hs

Haskell library for working with Factorio data
Haskell
5
star
32

dovin

A proof-assistant for Possibility Storm-style problems for Magic: The Gathering
Haskell
4
star
33

node-amqp-ragel

Node AMQP client that uses a ragel parser in a C extension. Doesn't work.
JavaScript
4
star
34

failtrain

Ruby
4
star
35

jruby-guice

Example app showing how to wire up Ruby classes with Google Guice.
Ruby
4
star
36

vegeinfo

Most pro-vege websites are shit, so I'm trying to make a better one
JavaScript
4
star
37

vitamin-vcv-modules

Assorted VCV Rack modules
C++
4
star
38

mtg-bench

Scala implementation of Magic The Gathering rules, geared towards algorithmic training
Scala
3
star
39

xtdo-hs

Haskell port of xtdo
Haskell
3
star
40

mnemonicker

An aid for remembering numbers
Ruby
3
star
41

veganmelb

Vegan. In Melbourne. Yeah!
JavaScript
3
star
42

roborabb

present for my bro
Ruby
3
star
43

consul-fs

Proof-of-concept fuse adapter for Consul KV store.
Ruby
3
star
44

enki-vim

Publish to enki with VIM. That's pretty neat.
Ruby
3
star
45

project-euler

Literate Haskell solutions to Project Euler
Haskell
3
star
46

nom

command line access to ausnom.com
Ruby
2
star
47

vegan-month

Vegan Month home page
HTML
2
star
48

project-hoff

HOFF
Ruby
2
star
49

blog-v2

Ruby
2
star
50

enki-website

Main page for enki
Ruby
2
star
51

babushka-deps

My deps for babushka
Ruby
2
star
52

reader

venus, with my config
Python
2
star
53

gust

ruby gist clone on top of plain rack
Ruby
2
star
54

singing

I'm learning to sing
2
star
55

card_game

Random Ruby utility libraries for modeling card games
Ruby
2
star
56

mit-advanced-ds

http://courses.csail.mit.edu/6.851/spring12/index.html
Ruby
2
star
57

rhnh

My blog - a fork of enki
Ruby
1
star
58

rack-my-id

An OpenID provider that does very little
Ruby
1
star
59

xaviershay.com

My home page
HTML
1
star
60

voxels-bench

Rust
1
star
61

mtg-bench-ruby

algorithmic training for MtG
Ruby
1
star
62

clear-menulet

A menulet that tells you when the CLEAR grain exchange is open, with growl notifications
1
star
63

aasm-presentation

Lightning talk for #roro
1
star
64

ori-tracker

C#
1
star
65

ausnom

Nutritional data of foods, as released by FSANZ
Ruby
1
star
66

cryptopals-solutions

Haskell
1
star
67

snes-game

Assembly
1
star
68

ludum-dare-35

PureScript
1
star
69

cibass

It's a CI server which doesn't work yet.
Ruby
1
star
70

mopus-gagnum

Haskell
1
star
71

pacebot

A bot to hang out in slack channels where runners frequent.
JavaScript
1
star
72

licross

crossword game
Haskell
1
star
73

factorio-solver-ui

hella wip
JavaScript
1
star
74

dm-nested-transactions

Adds nested transaction support to DataMapper
Ruby
1
star
75

scribebot

Quick and dirty slackbot for remembering things
Ruby
1
star
76

minisculus

a challenge!
Ruby
1
star
77

pacecalculator

http://pacecalculator.herokuapp.com
JavaScript
1
star
78

legendary-bench

Haskell
1
star
79

hrange

An experimental haskell implementation of the range query language.
Haskell
1
star
80

alien-parade

Aliens on parade! Flocking + gosu.
Ruby
1
star