Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chjj/dilated
A blog for node.js.
https://github.com/chjj/dilated
Last synced: 16 days ago
JSON representation
A blog for node.js.
- Host: GitHub
- URL: https://github.com/chjj/dilated
- Owner: chjj
- License: mit
- Created: 2011-06-12T15:26:25.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2014-02-19T08:23:13.000Z (over 10 years ago)
- Last Synced: 2024-10-20T01:14:54.458Z (24 days ago)
- Language: JavaScript
- Homepage: http://dilated.cc/
- Size: 441 KB
- Stars: 14
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dilated
Dilated is a blog written for [node.js][1]. See a live example at
[dilated.cc][2]. It's modeled after [Kroc Camen's][3] amazing blog. (It more or
less strives to be a faithful port of it.) It's very lightweight: articles are
stored as flat files (in markdown format with JSON metadata). It polls the
filesystem to build an index of posts and check for new/deleted ones.![dilated][4]
This blog was specifically written for myself. The markup and design are very
specific to my own site. The markup follows the same philosophy of camendesign:
there are no `@id's` or `@classes` used purely for the sake of CSS - instead,
selectors are used to their full potential. The css does not cater to terrible
browsers. etc.The code is somewhat narrow in what it was designed for. If you want to use
this blog yourself, be prepared to make a few changes. This is a project of
mine that will remain an indefinite work in progress.## Usage
``` bash
# Start and background dilated:
$ dilated -b
```### As a module
#### Regular Usage
``` js
var dilated = require('dilated');var conf = dilated.config.readConfig()
, app = dilated.createServer(conf);app.listen();
```#### Hookable Version
``` js
var dilated = require('dilated');var conf = dilated.config.readConfig()
, app = dilated.createServer(conf);app.server.on('request', function(req, res) {
// Handle something here
return app.handle(req, res);
});app.server.listen(app.conf.port, app.conf.hostname);
```#### Mountable Version
``` js
var dilated = require('dilated');var conf = dilated.config.readConfig()
, app;conf.webRoot = '/blog';
app = dilated.createServer(conf);
realApp.use('/blog', app);
`````` js
var dilated = require('dilated');var conf = dilated.config.readConfig()
, app = dilated.createServer(conf);realApp.use(express.vhost('*blog.example.com', app.handle));
```## Contribution and License Agreement
If you contribute code to this project, you are implicitly allowing your code
to be distributed under the MIT license. You are also implicitly verifying that
all code is your original work. ``## License
Copyright (c) 2011-2014, Christopher Jeffrey. (MIT License)
See LICENSE for more info.
[1]: http://nodejs.org/
[2]: http://dilated.cc/
[3]: http://camendesign.com/
[4]: https://raw.github.com/chjj/dilated/master/static/img/thumb.png