File tree Expand file tree Collapse file tree 6 files changed +41
-6
lines changed
Expand file tree Collapse file tree 6 files changed +41
-6
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,21 @@ override: false
1212cache :
1313 enable : true
1414
15+ # Redefine custom file pathes. Introduced in NexT v6.0.2.
16+ # If commented, will be used default custom file pathes.
17+ # For example, you want to put your custom styles file
18+ # outside theme directory in root `source/_data`, set
19+ # `styles: ../../../../../source/_data/styles.styl`
20+ # custom_file_path:
21+ # head: ../../../../../source-lang/_data/head.swig
22+ # header: ../../../../source-lang/_data/header.swig
23+ # sidebar: ../../../../source-lang/_data/sidebar.swig
24+
25+ # styles: ../../../../../source-lang/_data/styles.styl
26+ # mixins: ../../../../../source-lang/_data/mixins.styl
27+ # variables: ../../../../../source-lang/_data/variables.styl
28+
29+
1530# ---------------------------------------------------------------
1631# Site Information Settings
1732# ---------------------------------------------------------------
File renamed without changes.
Original file line number Diff line number Diff line change 135135 </div>
136136 {% endif %}
137137
138- {% include ' ../_custom/sidebar.swig' %}
138+ {% if theme.custom_file_path .sidebar %}
139+ {% set custom_sidebar = theme.custom_file_path .sidebar %}
140+ {% else %}
141+ {% set custom_sidebar = ' ../_custom/sidebar.swig' %}
142+ {% endif %}
143+ {% include custom_sidebar %}
139144 </div>
140145 </section>
141146
Original file line number Diff line number Diff line change 131131 };
132132</script>
133133
134- {% include ' ./custom-head.swig' %}
134+ {% if theme.custom_file_path .head %}
135+ {% set custom_head = theme.custom_file_path .head %}
136+ {% else %}
137+ {% set custom_head = ' ../../_custom/head.swig' %}
138+ {% endif %}
139+ {% include custom_head %}
Original file line number Diff line number Diff line change 9090 {% endif %}
9191</nav>
9292
93- {% include ' ../_custom/header.swig' %}
93+ {% if theme.custom_file_path .header %}
94+ {% set custom_header = theme.custom_file_path .header %}
95+ {% else %}
96+ {% set custom_header = ' ../_custom/header.swig' %}
97+ {% endif %}
98+ {% include custom_header %}
Original file line number Diff line number Diff line change 33
44
55$scheme = hexo-config ('scheme' ) ? hexo-config ('scheme' ) : 'Muse' ;
6- $variables = base $scheme custom ;
7- $mixins = base $scheme custom ;
6+
7+ $custom_styles = hexo-config ('custom_file_path.styles' ) ? hexo-config ('custom_file_path.styles' ) : custom ;
8+ $custom_mixins = hexo-config ('custom_file_path.mixins' ) ? hexo-config ('custom_file_path.mixins' ) : custom ;
9+ $custom_variables = hexo-config ('custom_file_path.variables' ) ? hexo-config ('custom_file_path.variables' ) : custom ;
10+
11+ $variables = base $scheme $custom_variables ;
12+ $mixins = base $scheme $custom_mixins ;
813
914
1015
@@ -42,4 +47,4 @@ for $mixin in $mixins
4247
4348// Custom Layer
4449// --------------------------------------------------
45- @import "_custom/custom" ;
50+ @import "_custom/" + $custom_styles ;
You can’t perform that action at this time.
0 commit comments