File tree Expand file tree Collapse file tree 7 files changed +68
-6
lines changed Expand file tree Collapse file tree 7 files changed +68
-6
lines changed Original file line number Diff line number Diff line change 1
1
/site /index.html
2
2
/build
3
3
/html
4
+ /log
5
+ /node_modules
4
6
/site /de
5
7
/site /ru
6
8
* .md~
Original file line number Diff line number Diff line change @@ -197,5 +197,9 @@ var Garden = Class(function(options) {
197
197
}
198
198
} ) ;
199
199
200
- new Garden ( { dir : 'doc' , template : 'garden.jade' , out : 'site' } ) ;
200
+ exports . build = function ( options ) {
201
+ options = options || { dir : 'doc' , template : 'garden.jade' , out : 'site' } ;
202
+ new Garden ( options ) ;
203
+ }
201
204
205
+ exports . build ( ) ;
Original file line number Diff line number Diff line change 9
9
"articles" : [
10
10
" authors" ,
11
11
" contributors" ,
12
+ " hosting" ,
12
13
" license"
13
14
]
14
15
},
Original file line number Diff line number Diff line change
1
+ ## Hosting
2
+
3
+ [ Cramer Development] [ 1 ] bought the domain name and has donated hosting space for [ JavaScriptGarden.info] [ 2 ] .
4
+
5
+ [ 1 ] : http://cramerdev.com/
6
+ [ 2 ] : http://javascriptgarden.info/
7
+
Original file line number Diff line number Diff line change @@ -26,10 +26,10 @@ html(lang=language)
26
26
- each lang in languages
27
27
li( class =lang .id === language ? 'active' : '' )
28
28
- if (lang .id === baseLanguage)
29
- a( href = '/JavaScript-Garden/ ' , title =lang .title ) #{lang .id }
29
+ a( href = '/' , title =lang .title ) #{lang .id }
30
30
31
31
- else
32
- a( href = '/JavaScript-Garden/ ' + lang .id , title =lang .title ) #{lang .id }
32
+ a( href = '/' + lang .id , title =lang .title ) #{lang .id }
33
33
a( id ='top' , href ='#intro' , title ='Back to top' ) #top
34
34
a( id ='hide_menu' , class ='tablet' ) Hide Menu
35
35
@@ -78,10 +78,13 @@ html(lang=language)
78
78
footer
79
79
p Copyright © 2011. Built with
80
80
|
81
- a( href ='http://nodejs.org/' ) Node.js
81
+ a( href ='http://nodejs.org/' ) Node.js
82
82
| using a
83
- a( href ='https://github.com/visionmedia/jade/' ) jade
84
- | template.
83
+ a( href ='https://github.com/visionmedia/jade/' ) jade
84
+ | template.
85
+ | Hosted by
86
+ a( href ='http://cramerdev.com' ) Cramer Development
87
+ .
85
88
86
89
script( src ='http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js' )
87
90
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " javascript-garden" ,
3
+ "description" : " A collection of documentation about the most quirky parts of the JavaScript language." ,
4
+ "version" : " 0.0.0" ,
5
+ "dependencies" : {
6
+ "fomatto" : " 0.5.0" ,
7
+ "forever" : " 0.4.1" ,
8
+ "jade" : " 0.9.1" ,
9
+ "neko" : " 1.1.2" ,
10
+ "node-markdown" : " 0.1.0"
11
+ }
12
+ }
Original file line number Diff line number Diff line change
1
+ // This server implements a post-receive hook handler for github that will build the site
2
+ var build = require ( './build' ) . build ,
3
+ qs = require ( 'querystring' ) ,
4
+ port = 9900 ,
5
+ repoURL = "https://github.com/cramerdev/JavaScript-Garden" ;
6
+
7
+ require ( 'http' ) . createServer ( function ( request , response ) {
8
+ var payload = '' ;
9
+ try {
10
+ if ( request . method === 'POST' ) {
11
+ request . setEncoding ( 'utf8' ) ;
12
+ request . on ( 'data' , function ( data ) {
13
+ payload += data ;
14
+ } ) ;
15
+ request . on ( 'end' , function ( ) {
16
+ console . log ( payload ) ;
17
+ payload = JSON . parse ( qs . parse ( payload ) . payload ) ;
18
+ if ( payload . repository . url === repoURL ) {
19
+ build ( ) ;
20
+ } else {
21
+ response . writeHead ( 400 ) ; // Bad Request
22
+ }
23
+ } ) ;
24
+ response . writeHead ( 200 ) ; // OK
25
+ } else {
26
+ response . writeHead ( 405 ) ; // Method Not Allowed
27
+ }
28
+ } catch ( e ) {
29
+ console . error ( "Error: " + e ) ;
30
+ response . writeHead ( 500 ) ; // Internal Server Error
31
+ }
32
+ response . end ( ) ;
33
+ } ) . listen ( port ) ;
You can’t perform that action at this time.
0 commit comments