From 42d988ef38f612a34bc4560cd65af5f0de54ab2c Mon Sep 17 00:00:00 2001
From: Julian Xhokaxhiu <julianxhokaxhiu@users.noreply.github.com>
Date: Sat, 9 Sep 2017 10:23:42 +0200
Subject: [PATCH 1/3] Allow the user to override the whole configuration

Fixes #1860
---
 scripts/merge-configs.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/merge-configs.js b/scripts/merge-configs.js
index 0428f4d29..8e1333bc5 100644
--- a/scripts/merge-configs.js
+++ b/scripts/merge-configs.js
@@ -9,6 +9,11 @@ var merge = require('./merge');
 hexo.on('generateBefore', function () {
   if (hexo.locals.get) {
     var data = hexo.locals.get('data');
-    data && data.next && merge(hexo.theme.config, data.next);
+    if ( data && data.next ) {
+      if ( data.next.override )
+        hexo.theme.config = data.next
+      else
+        merge(hexo.theme.config, data.next)
+    }
   }
 });

From e840e711329c6a59e593669bc4fd1e2cac5210eb Mon Sep 17 00:00:00 2001
From: Julian Xhokaxhiu <julianxhokaxhiu@users.noreply.github.com>
Date: Sat, 9 Sep 2017 10:30:47 +0200
Subject: [PATCH 2/3] Fix HoundCI issues

---
 scripts/merge-configs.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/scripts/merge-configs.js b/scripts/merge-configs.js
index 8e1333bc5..3f6cf71dc 100644
--- a/scripts/merge-configs.js
+++ b/scripts/merge-configs.js
@@ -10,10 +10,11 @@ hexo.on('generateBefore', function () {
   if (hexo.locals.get) {
     var data = hexo.locals.get('data');
     if ( data && data.next ) {
-      if ( data.next.override )
-        hexo.theme.config = data.next
-      else
-        merge(hexo.theme.config, data.next)
+      if ( data.next.override ) {
+        hexo.theme.config = data.next;
+      } else {
+        merge(hexo.theme.config, data.next);
+      }
     }
   }
 });

From ee60c3195bd816496abec7b81ba1961f7de5593c Mon Sep 17 00:00:00 2001
From: Julian Xhokaxhiu <julianxhokaxhiu@users.noreply.github.com>
Date: Sat, 9 Sep 2017 10:33:56 +0200
Subject: [PATCH 3/3] Update _config.yml

Add override flag documentation
---
 _config.yml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/_config.yml b/_config.yml
index fe6f2570b..4b3974a0c 100755
--- a/_config.yml
+++ b/_config.yml
@@ -1,3 +1,11 @@
+# ---------------------------------------------------------------
+# Theme Core Configuration Settings
+# ---------------------------------------------------------------
+
+# Set to true, if you want to fully override the default configuration.
+# Useful if you don't want to inherit the theme _config.yml configurations.
+override: false
+
 # ---------------------------------------------------------------
 # Site Information Settings
 # ---------------------------------------------------------------