Skip to content

Commit 37dc9d4

Browse files
committed
Code optimization.
1 parent 4d2a9f7 commit 37dc9d4

File tree

7 files changed

+15
-6
lines changed

7 files changed

+15
-6
lines changed

_config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ defaults:
140140
-
141141
label: Home
142142
url: /
143+
-
144+
scope:
145+
path: assets/data
146+
values:
147+
layout: compress
148+
143149

144150
sass:
145151
sass_dir: /assets/css

_includes/search-loader.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
searchInput: document.getElementById('search-input'),
2626
resultsContainer: document.getElementById('search-results'),
2727
json: '{{ site.baseurl }}/assets/data/search.json',
28-
searchResultTemplate: '{{ result_elem }}',
28+
searchResultTemplate: '{{ result_elem | strip_newlines }}',
2929
noResultsText: '{{ not_found }}'
3030
});
3131
</script>

assets/data/proxy.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
22
---
33

4-
{"proxyUrl":"{{ site.google_analytics.proxy_url }}"}
4+
{
5+
"proxyUrl": "{{ site.google_analytics.proxy_url }}"
6+
}

assets/data/search.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
layout: compress
32
---
43

54
[

assets/img/favicons/browserconfig.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
2+
layout: compress
3+
24
# A part of the Favicons
35
# v2.0
46
# https://github.com/cotes2020/jekyll-theme-chirpy
57
# © 2019 Cotes Chung
68
# MIT License
7-
layout: compress
89
---
910
<?xml version="1.0" encoding="utf-8"?>
1011
<browserconfig>

assets/img/favicons/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
2+
layout: compress
3+
24
# A part of the Favicons
35
# v2.0
46
# https://github.com/cotes2020/jekyll-theme-chirpy
57
# © 2019 Cotes Chung
68
# MIT License
7-
layout: compress
89
---
910

1011
{

sitemap.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: compress
3-
#
3+
44
# The Sitemap template
55
# v2.0
66
# https://github.com/cotes2020/jekyll-theme-chirpy

0 commit comments

Comments
 (0)