diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..14d354b --- /dev/null +++ b/.jshintrc @@ -0,0 +1,25 @@ +{ + "browser": true, + + "bitwise": true, + "curly": true, + "eqeqeq": true, + "forin": true, + "immed": true, + "indent": 2, + "latedef": true, + "newcap": true, + "noarg": true, + "noempty": true, + "nonew": true, + "plusplus": true, + "quotmark": "double", + "undef": true, + "unused": true, + "strict": true, + "trailing": true, + "maxparams": 6, + "maxlen": 80, + + "predef": ["jQuery"] +} diff --git a/_nav.jade b/_nav.jade index d85de23..7b51ecd 100644 --- a/_nav.jade +++ b/_nav.jade @@ -13,4 +13,6 @@ nav.nav.main-nav(role="navigation", class="banner") a(href="/blog") Blog li.nav-item a(href="/sponsors") Sponsors + li.nav-item + a(href="/code-of-conduct") Code of Conduct diff --git a/blog/_blog.jade b/blog/_blog.jade index 98a47e4..6d164d4 100644 --- a/blog/_blog.jade +++ b/blog/_blog.jade @@ -1,29 +1,29 @@ article.h-entry - a.u-url(href= "") - h2.p-name= properties.name + a.u-url(href= "#{slug}") + h2.p-name= title p | Published by =' ' - each author, index in properties.author - a.p-author.h-card(href= properties.author[index].properties.url)= properties.author[index].properties.name + each author, index in author + a.p-author.h-card(href= author[index].website)= author[index].name =' ' =' ' - time.dt-published= properties.published + time.dt-published= published .e-content != yield .p-category - = properties.category[0].category + = category[0].category =' ' - = properties.category[0].tags + = category[0].tags h3 About the Author - each author, index in properties.author + each author, index in author p - a.p-author.h-card(href= properties.author[index].properties.url)= properties.author[index].properties.name - p= properties.author[index].properties.description + a.p-author.h-card(href= author[index].website)= author[index].name + p= author[index].description diff --git a/blog/index.jade b/blog/index.jade index 5c67c02..00cfcd0 100644 --- a/blog/index.jade +++ b/blog/index.jade @@ -5,21 +5,18 @@ p Some stuff we want to say about our blog. for post, slug in public.blog.posts._data if post.layout !== false article.h-entry - a.u-url(href= "#{ post.properties.permalink[0].url }") - h2.p-name= post.properties.name + a.u-url(href= "#{slug}") + h2.p-name= post.title p | Published by =' ' - each author, index in post.properties.author - a.p-author.h-card(href= post.properties.author[index].properties.url)= post.properties.author[index].properties.name + each author, index in post.author + a.p-author.h-card(href= post.author[index].website)= post.author[index].name =' ' | on =' ' - time.dt-published= post.properties.published - - p.p-summary= post.properties.summary - - + time.dt-published= post.published + p.p-summary= post.summary diff --git a/blog/posts/_data.json b/blog/posts/_data.json index f129bf1..92ab153 100644 --- a/blog/posts/_data.json +++ b/blog/posts/_data.json @@ -1,157 +1,63 @@ { "post-2": { - "type": [ - "h-entry" + "title":"Sample Post 2", + "author": [ + { + "name":"John Doe", + "website":"http://www.google.com", + "description":"lobortis viverra dolor tincidunt eu. Pellentesque nec ma" + }, + { + "name":"Kevin Doe", + "url":"www.blackle.com", + "description":"lobortis viverra dolor tincidunt eu. Pellentesque nec ma" + } ], - "properties": { - "name": [ - "Sample Post 2" - ], - "author": [ - { - "value": "John Doe", - "type": [ - "h-card" - ], - "properties": { - "name": [ - "John Doe" - ], - "url": [ - "http://example.com" - ], - "description": [ - "lobortis viverra dolor tincidunt eu. Pellentesque nec ma" - ] - } - }, - { - "value": "Kevin Doe", - "type": [ - "h-card" - ], - "properties": { - "name": [ - "Kevin Doe" - ], - "url": [ - "http://example2.com" - ], - "description": [ - "lobortis viverra dolor tincidunt eu. Pellentesque nec ma" - ] - } - } - ], - "published": [ - "2015-01-04 12:00:00" - ], - "summary": [ - "Sed elementum consectetur sem, lobortis viverra dolor tincidunt eu. Pellentesque nec malesuada tortor, nec rutrum est. Donec fermentum ut nunc at scelerisque. Morbi elementum, lacus at bibendum vehicula, neque felis semper urna, at auctor mi lorem nec ex." - ], - "category": [ - { - "category": "cat1", - "tags": "tag1, tag2, tag3" - } - ], - "permalink": [ - { - "url" : "/blog/posts/post-2" - } - ] - } + "published":"2015-01-04 12:00:00", + "summary":"Sed elementum consectetur sem, lobortis viverra dolor tincidunt eu. Pellentesque nec malesuada tortor, nec rutrum est. Donec fermentum ut nunc at scelerisque. Morbi elementum, lacus at bibendum vehicula, neque felis semper urna, at auctor mi lorem nec ex.", + "category": [ + { + "category": "cat1", + "tags": "tag1, tag2, tag3" + } + ] }, + "styleguide": { - "type": [ - "h-entry" + "title":"The Styleguide", + "author": [ + { + "name":"Jane Doe", + "website":"http://www.yahoo.com", + "description":"lobortis viverra dolor tincidunt eu. Pellentesque nec ma" + } ], - "properties": { - "name": [ - "Sample Post 1" - ], - "author": [ - { - "value": "Jane Doe", - "type": [ - "h-card" - ], - "properties": { - "name": [ - "Jane Doe" - ], - "url": [ - "http://example.com" - ], - "description": [ - "lobortis viverra dolor tincidunt eu. Pellentesque nec ma" - ] - } - } - ], - "published": [ - "2015-01-03 12:00:00" - ], - "summary": [ - "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas id tortor feugiat, mollis urna non, viverra lectus. Sed fringilla rutrum orci eu volutpat. Donec viverra enim vitae purus bibendum, quis euismod ligula ultricies." - ], - "category": [ - { - "category": "cat1", - "tags": "tag2" - } - ], - "permalink": [ - { - "url" : "/blog/posts/post-1" - } - ] - } + "published":"2015-01-03 12:00:00", + "summary":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas id tortor feugiat, mollis urna non, viverra lectus. Sed fringilla rutrum orci eu volutpat. Donec viverra enim vitae purus bibendum, quis euismod ligula ultricies.", + "category": [ + { + "category": "cat1", + "tags": "tag2" + } + ] }, + "welcome": { - "type": [ - "h-entry" + "title":"Welcome to GothamSass!", + "author": [ + { + "name":"Team GothamSass", + "website":"http://www.gothamsass.org", + "description":"We are Gothamsass!" + } ], - "properties": { - "name": [ - "Welcome to GothamSass!" - ], - "author": [ - { - "value": "Team GothamSass", - "type": [ - "h-card" - ], - "properties": { - "name": [ - "Team GothamSass" - ], - "url": [ - "http://example.com" - ], - "description": [ - "lobortis viverra dolor tincidunt eu. Pellentesque nec ma" - ] - } - } - ], - "published": [ - "2015-01-01 12:00:00" - ], - "summary": [ - "GothamSass for the New Year!" - ], - "category": [ - { - "category": "category", - "tags": "tag1, tag2, tag3" - } - ], - "permalink": [ - { - "url" : "/blog/posts/welcome" - } - ] - } + "published":"2015-01-01 12:00:00", + "summary": "GothamSass for the New Year!", + "category": [ + { + "category": "category", + "tags": "tag1, tag2, tag3" + } + ] } } diff --git a/gulpfile.js b/gulpfile.js index deb487d..edc00ed 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,9 +4,11 @@ var reload = browserSync.reload; var harp = require('harp'); var scsslint = require('gulp-scss-lint'); var cache = require('gulp-cached'); +var jshint = require('gulp-jshint'); var paths = { templates: '**/*.{jade, md}', + json: '**/_data.json', css: 'assets/stylesheets/*.css', sass: ['assets/stylesheets/**/*.scss', 'assets/stylesheets/*.scss'], images: 'assets/stylesheets/img/**/*', @@ -50,13 +52,21 @@ gulp.task('serve', function () { /** * Lint files */ -gulp.task('lint', function() { +gulp.task('lint-sass', function() { gulp.src(paths.sass) .pipe(cache('scsslint')) .pipe(scsslint({'config': 'lint.yml',})) .pipe(reload({stream: true})); }); +gulp.task('lint-js', function() { + return gulp.src([ + paths.json + ]) + .pipe(jshint()) + .pipe(jshint.reporter('default')); +}); + /** * Default task, running just `gulp` will compile the sass, diff --git a/package.json b/package.json index c4ba888..fe1e10f 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "browser-sync": "^1.9.0", "gulp": "^3.8.10", "gulp-cached": "^1.0.2", + "gulp-jshint": "^1.9.2", "gulp-scss-lint": "^0.1.4", "scsslint": "0.0.3" }