diff --git a/.editorconfig b/.editorconfig
index b55be14..c8e529a 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -8,3 +8,11 @@ indent_size = 2
[*.css]
indent_style = space
indent_size = 2
+
+[*.js]
+indent_style = space
+indent_size = 2
+
+[*.y{a,}ml]
+indent_style = space
+indent_size = 2
diff --git a/.gitignore b/.gitignore
index ca35be0..ee52763 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
-_site
+/_site/
+/node_modules/
+/Gemfile.lock
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..053c27d
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,2 @@
+source 'https://rubygems.org'
+gem 'github-pages'
diff --git a/_config.yaml b/_config.yaml
new file mode 100644
index 0000000..67f88b0
--- /dev/null
+++ b/_config.yaml
@@ -0,0 +1,7 @@
+exclude:
+ - node_modules
+ - CNAME
+ - Gemfile
+ - Gemfile.lock
+ - gulpfile.js
+ - package.json
diff --git a/_js/demo.js b/_js/demo.js
new file mode 100644
index 0000000..a711ec9
--- /dev/null
+++ b/_js/demo.js
@@ -0,0 +1,47 @@
+(function ($) {
+
+ var editorconfig = require('editorconfig');
+
+ function createFiles() {
+ var configFiles = [], configSuffix = "/.editorconfig";
+ $('.js-ec-demo-config').each(function () {
+ var pathLength, configPath, form = $(this);
+ configPath = form.find('[name="filename"]').val();
+ pathLength = configPath.length - configSuffix.length;
+ if (configPath.indexOf(configSuffix, pathLength) !== -1) {
+ configFiles.push({
+ name: configPath,
+ contents: form.find('[name="file"]').val()
+ });
+ }
+ });
+ return configFiles;
+ }
+
+ // Resize textarea automatically
+ $('textarea').on('input', function () {
+ // Set textarea height
+ this.style.height = 'auto';
+ this.style.height = this.scrollHeight + 16 + 'px';
+ }).trigger('input');
+
+ function renderOutput(configFiles) {
+ $('.js-ec-demo-output').each(function () {
+ var output = "", config, key, filename;
+ filename = $(this).find('[name="filename"]');
+ config = editorconfig.parseFromFiles(filename.val(), configFiles);
+ for (key in config) {
+ if (config.hasOwnProperty(key)) {
+ output += key + " = " + config[key] + "\n";
+ }
+ }
+ $(this).find('pre').text(output);
+ });
+ }
+
+ // Update output automatically
+ $('input, textarea').on('input', function () {
+ renderOutput(createFiles());
+ }).trigger('input');
+
+}(jQuery));
diff --git a/_layouts/default.html b/_layouts/default.html
index 6bfc743..2c9261d 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -17,7 +17,7 @@
-
+
+