@@ -36,16 +36,19 @@ asset('source/**/*.md', '!source/{events,jobs,news}/**/*')
3636 . pipe ( marked ( ) )
3737 . pipe ( layout ( 'default' ) )
3838
39+ // Index page
3940asset ( 'source/events/**/*.md' )
4041 . watch ( 'source/**/*.{md,njk}' )
4142 . pipe ( frontMatter ( { property : 'fm' } ) )
4243 . pipe ( marked ( ) )
4344 . pipe ( accumulate ( 'index.html' , {
4445 debounce : true ,
45- sort : ( x , y ) => y . fm . date [ 0 ] . valueOf ( ) - x . fm . date [ 0 ] . valueOf ( )
46+ sort : ( x , y ) => y . fm . date [ 0 ] . valueOf ( ) - x . fm . date [ 0 ] . valueOf ( ) ,
47+ filter : ( x ) => x . fm . date [ 0 ] . valueOf ( ) > Date . now ( ) // filter the past events
4648 } ) )
4749 . pipe ( layout ( 'index' ) )
4850
51+ // Event index pages
4952asset ( 'source/events/**/*.md' )
5053 . watch ( 'source/**/*.{md,njk}' )
5154 . pipe ( frontMatter ( { property : 'fm' } ) )
@@ -56,12 +59,14 @@ asset('source/events/**/*.md')
5659 } ) )
5760 . pipe ( layout ( 'event-index' ) )
5861
62+ // Single event page
5963asset ( 'source/events/**/*.md' )
6064 . watch ( 'source/**/*.{md,njk}' )
6165 . pipe ( frontMatter ( { property : 'fm' } ) )
6266 . pipe ( marked ( ) )
6367 . pipe ( layout ( 'event' ) )
6468
69+ // News index page
6570asset ( 'source/news/**/*.md' )
6671 . watch ( 'source/**/*.{md,njk}' )
6772 . pipe ( frontMatter ( { property : 'fm' } ) )
@@ -72,12 +77,14 @@ asset('source/news/**/*.md')
7277 } ) )
7378 . pipe ( layout ( 'news-index' ) )
7479
80+ // Single news pages
7581asset ( 'source/news/**/*.md' )
7682 . watch ( 'source/**/*.{md,njk}' )
7783 . pipe ( frontMatter ( { property : 'fm' } ) )
7884 . pipe ( marked ( ) )
7985 . pipe ( layout ( 'news' ) )
8086
87+ // Job index page
8188asset ( 'source/jobs/**/*.md' )
8289 . watch ( 'source/**/*.{md,njk}' )
8390 . pipe ( frontMatter ( { property : 'fm' } ) )
@@ -88,14 +95,15 @@ asset('source/jobs/**/*.md')
8895 } ) )
8996 . pipe ( layout ( 'jobboard' ) )
9097
98+ // Single job page
9199asset ( 'source/jobs/**/*.md' )
92100 . watch ( 'source/**/*.{md,njk}' )
93101 . pipe ( frontMatter ( { property : 'fm' } ) )
94102 . pipe ( marked ( ) )
95103 . pipe ( layout ( 'job' ) )
96104
97105asset ( 'source/css/*.css' )
98-
99106asset ( 'source/images/**/*.{png,svg,jpg,jpeg,gif}' )
100107
108+ // Old site is available under http://nodejs.jp/old/
101109asset ( './old/*.*' ) . base ( './' )
0 commit comments