diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7a303a0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +_site +js/data.js +node_modules +.grunt diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..89c40d5 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,14 @@ +module.exports = function(grunt) { + + grunt.initConfig({ + 'gh-pages': { + options: { + base: '_site' + }, + src: ['**'] + } + }); + + grunt.loadNpmTasks('grunt-gh-pages'); + +}; \ No newline at end of file diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..0c4c79f --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +exclude: ["geojson", "node_modules", "script", "Gruntfile.js", "package.json"] \ No newline at end of file diff --git a/_plugins/geojson.rb b/_plugins/geojson.rb new file mode 100644 index 0000000..78a61ce --- /dev/null +++ b/_plugins/geojson.rb @@ -0,0 +1,17 @@ +module Geojson + class Generator < Jekyll::Generator + def generate(site) + data = File.join "js", "data.js"; + File.open data, "w" do |file| + file.puts "var data = [" + + Dir.glob('geojson/*.geojson') do |geojson| + json = File.read(geojson) + "," + file.puts json + end + + file.puts "];" + end + end + end +end \ No newline at end of file diff --git a/index.html b/index.html index 0f73ce6..1859cca 100644 --- a/index.html +++ b/index.html @@ -13,69 +13,8 @@
- - + +