Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7f7436f
Showing
10 changed files
with
226 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Kel | ||
|
||
Kel is a ridculously simple markdown file-based website system. It is super easy to setup, simple as anything and as flexible as you can make it. | ||
|
||
**Latest Version:** 0.1.0 | ||
|
||
## Features | ||
|
||
- **Easy setup:** Copy files to server and then run `node server` | ||
- **Simple Editing:** Every markdown file under the `/pages` folders is a page. Create or edit the markdown file and you're done. | ||
- **Flexible Theming:** Write your own themes and styles. Just leave a variable for `body`. | ||
|
||
## Installation | ||
|
||
1. [Download](https://github.com/koostudios/kel/zipball/master) the files or `git clone git@github.com:koostudios/kel.git` | ||
2. Install the dependencies using `npm install`. You may also have to install the dependencies depending on your template. For example, I used the jade engine for my template and installed jade through `npm install` | ||
3. Run using `node server` | ||
|
||
## License | ||
Copyright (c) 2012 Alexander Yuen <koo.studios@gmail.com> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"title": "Kel", | ||
"description": "Kel is a ridculously simple markdown file-based website system.", | ||
"author": "Alexander Yuen", | ||
"port": "17548", | ||
"template": { | ||
"name": "breeze", | ||
"engine": "jade" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
fs = require 'fs' | ||
exp = require 'express' | ||
app = exp.createServer() | ||
md = require('node-markdown').Markdown | ||
config = require './config' | ||
dir = __dirname + '/templates/' + config.template.name | ||
|
||
app.configure () -> | ||
app.set 'view engine', config.template.engine | ||
app.set 'view options', {layout: false} | ||
app.set 'views', dir | ||
app.use exp.static dir + '/public' | ||
|
||
app.listen config.port | ||
console.log 'Server running at port ' + app.address().port | ||
|
||
app.get '/', (req, res, next) -> | ||
fs.readFile __dirname + '/pages/index.md', (err, data) -> | ||
if err | ||
next() | ||
else | ||
res.render 'layout', {body: md(data.toString()), config: config} | ||
|
||
app.get '/:id', (req, res, next) -> | ||
fs.readFile __dirname + '/pages/' + req.params.id + '.md', (err, data) -> | ||
if err | ||
next() | ||
else | ||
res.render 'layout', {body: md(data.toString()), config: config} | ||
|
||
app.get '/*', (req, res) -> | ||
res.render 'layout', {body: '<b>404</b> Oopsies, not found.'} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "Kel", | ||
"description": "Kel is a ridculously simple markdown file-based website system.", | ||
"tags": ["cms", "content management", "markdown", "file-based"], | ||
"version": "0.1.0", | ||
"homepage": "https://github.com/koostudios/kel", | ||
"author": "Alexander Yuen <koo.studios@gmail.com> (http://www.koostudios.com)", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/koostudios/kel.git" | ||
}, | ||
"bugs": "https://github.com/koostudios/kel/issues", | ||
"node": "0.6.12", | ||
"main": "server.js", | ||
"dependencies": { | ||
"coffee-script" : "1.2.x", | ||
"express" : "2.5.x", | ||
"node-markdown" : "0.1.x" | ||
}, | ||
"license": "MIT" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# About. | ||
Kel is a ridiculously simple markdown file-based website system built on Express, CoffeeScript and NodeJS. It is super easy to setup, simple as anything and as flexible as you can make it. Kel has been lovingly handcoded by Alexander Yuen of [KOO Studios](http://www.koostudios.com). | ||
|
||
## Name and Philosophy. | ||
Kel is named after Kelly Johnson, the system engineer who first articulated the design principle of KISS. Kel keeps to the "keep it short and simple" guideline and avoid unnecessary complexity as much as possible. | ||
|
||
## Contribute to Kel. | ||
Kel is an open source project hosted on [Github](https://www.github.com/koostudios/kel) and licensed under the MIT License. Use a [pull request](https://www.github.com/koostudios/kel/pulls) to let us know of some cool feature or bug fix that you've made! We accept patches as long as they’re useful and conform to our standards. | ||
|
||
If you wish to join the project as a contributor, please contact me with an [email](mailto: koo.studios@gmail.com) or via my twitter handle [@koostudios](http://koostudios.com). Everyone is welcome! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
![No databases, just files. Simple](/front.jpg) | ||
|
||
# Say _Hello_ to Kel. | ||
Ever wanted to create a simple, static website but didn't want to do all the work coding individual pages in HTML and then updating those HTML pages? Love Markdown so much that you've nearly forgotten how to do markup in HTML? Well, say _hello_ to Kel, the ridiculously simple static website system for NodeJS. | ||
|
||
# Features. | ||
<table> | ||
<tr> | ||
<td width=33%> | ||
<h3>Simple Installation</h3> | ||
<p><b>Upload</b> the files to your NodeJS server and then run. After 5 minutes and a single click, you're off the ground.</p> | ||
</td> | ||
<td width=33%> | ||
<h3>Try NoDB</h3> | ||
<p>Kel uses no databases - <b>none, zilch, zero</b>. It simply uses files with the extension '.md' from a single folder.</p> | ||
</td> | ||
<td width=33%> | ||
<h3>You're In Control</h3> | ||
<p>No more struggling to make a CMS do what you want. Write your own content and your own template in your own language.</p> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
[More](/about) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require('coffee-script'); | ||
require('./main'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
!!! 5 | ||
html(lang= 'en') | ||
head | ||
meta(charset= 'utf-8') | ||
title= config.title | ||
meta(name= 'description', content= config.description) | ||
link(rel= 'stylesheet', href= '/style.css') | ||
body | ||
header | ||
a(href= '/') | ||
h1= config.title | ||
nav | ||
a(href= 'https://github.com/koostudios/kel/master/')= 'Download' | ||
a(href= 'https://github.com/koostudios/kel')= 'Github' | ||
a(href= '/about')= 'About' | ||
.content | ||
!= body | ||
footer © 2012 #{config.author}. Made with ♥ and Kel. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
body { | ||
background: #FFF; | ||
max-width: 800px; | ||
margin: 20px auto; | ||
padding: 20px; | ||
font-family: "Helvetica Neue", Sans; | ||
-webkit-font-smoothing: antialiased; | ||
color: #888; | ||
} | ||
|
||
a { | ||
color: #327CCB; | ||
} | ||
|
||
a:hover { | ||
text-decoration: none; | ||
} | ||
|
||
table { | ||
margin: 1em 0; | ||
} | ||
|
||
table td { | ||
padding-right: 10px; | ||
font-size: 0.9em; | ||
} | ||
|
||
header { | ||
position: relative; | ||
margin-bottom: 20px; | ||
} | ||
|
||
header h1 { | ||
display: inline; | ||
font-family: "Gill Sans", Sans; | ||
font-size: 3em; | ||
color: #327CCB; | ||
} | ||
|
||
header nav { | ||
position: absolute; | ||
top: 10px; | ||
right: 0; | ||
display: block; | ||
margin-top: 10px; | ||
max-width: 800px; | ||
} | ||
|
||
header nav a { | ||
margin-left: 25px; | ||
} | ||
|
||
header a { | ||
text-decoration: none; | ||
} | ||
|
||
header a:hover { | ||
color: #333; | ||
} | ||
|
||
.content h1, | ||
.content h2, | ||
.content h3, | ||
.content h4, | ||
.content h5, | ||
.content h6 { | ||
font-family: "Gill Sans", Sans; | ||
font-weight: normal; | ||
color: #333; | ||
margin: 2px; | ||
} | ||
|
||
.content p { | ||
margin: 1em 0 1.5em; | ||
} | ||
|
||
footer { | ||
border-top: 1px solid #CCC; | ||
margin-top: 3em; | ||
padding: 5px 0; | ||
font-size: 0.8em; | ||
color: #AAA; | ||
} |