Heb support voor markdown toegevoegd. Ik kan nu beginnen met het schrijven van mijn pws.
This commit is contained in:
parent
d98d8a4dbd
commit
107e452ab5
3
markdown/test.md
Normal file
3
markdown/test.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
###Hallo daar!
|
||||||
|
|
||||||
|
Ik kan hier typen wat ik wil.
|
|
@ -11,6 +11,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^4.13.0",
|
"express": "^4.13.0",
|
||||||
"express-less": "0.0.7",
|
"express-less": "0.0.7",
|
||||||
|
"express-markdown": "0.0.6",
|
||||||
"jade": "^1.11.0"
|
"jade": "^1.11.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
8
resources/jade/article.jade
Normal file
8
resources/jade/article.jade
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
html
|
||||||
|
head
|
||||||
|
title Hoe werkt Werkmanrooster ?
|
||||||
|
link(rel="stylesheet", href="/css/style.css", type="text/css")
|
||||||
|
link(rel="stylesheet", href="/css/skeleton.css", type="text/css")
|
||||||
|
|
||||||
|
body
|
||||||
|
.container!=markdown
|
|
@ -5,4 +5,4 @@ html
|
||||||
link(rel="stylesheet", href="/css/skeleton.css", type="text/css")
|
link(rel="stylesheet", href="/css/skeleton.css", type="text/css")
|
||||||
|
|
||||||
body
|
body
|
||||||
h1 HEY THERE
|
.container=markdown
|
||||||
|
|
9
web.js
9
web.js
|
@ -1,6 +1,7 @@
|
||||||
//web.js
|
//web.js
|
||||||
var express = require('express');
|
var express = require('express');
|
||||||
var less = require('express-less');
|
var less = require('express-less');
|
||||||
|
var markdown = require('express-markdown');
|
||||||
|
|
||||||
var app = express();
|
var app = express();
|
||||||
|
|
||||||
|
@ -13,9 +14,11 @@ app.set('views', __dirname + '/resources/jade');
|
||||||
app.use('/css', less(__dirname + '/resources/less'));
|
app.use('/css', less(__dirname + '/resources/less'));
|
||||||
// app.use('/js', express.static(__dirname + '/resources/js'));
|
// app.use('/js', express.static(__dirname + '/resources/js'));
|
||||||
app.use('/other', express.static(__dirname + '/resources/other'));
|
app.use('/other', express.static(__dirname + '/resources/other'));
|
||||||
|
//Setup markdown middleware.
|
||||||
|
app.use(markdown({directory: __dirname + '/markdown', view: 'article'}));
|
||||||
|
|
||||||
app.get('/', function (req, res) {
|
// app.get('/', function (req, res) {
|
||||||
res.render('home');
|
// res.render('home');
|
||||||
});
|
// });
|
||||||
|
|
||||||
app.listen(1025);
|
app.listen(1025);
|
||||||
|
|
Loading…
Reference in a new issue