Skip to content

Commit 8c0f504

Browse files
authored
支持 html sass 产物压缩 (#265)
1 parent 3e25c31 commit 8c0f504

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

_config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,13 @@ permalink: /:categories/:title/
117117

118118
compress_html:
119119
clippings: all
120+
comments: all
120121
ignore:
121122
envs: development
122123

124+
sass:
125+
style: compressed
126+
123127
head_scripts:
124128
- /assets/js/theme.js
125129

_layouts/default.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: compress
3+
---
4+
5+
<!doctype html>
6+
{% include copyright.html %}
7+
<html lang="{{ site.locale | replace: "_", "-" | default: "en" }}" class="no-js">
8+
<head>
9+
{% include head.html %}
10+
{% include head/custom.html %}
11+
</head>
12+
13+
<body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}" dir="{% if site.rtl %}rtl{% else %}ltr{% endif %}">
14+
{% include_cached skip-links.html %}
15+
{% include_cached masthead.html %}
16+
17+
<div class="initial-content">
18+
{{ content }}
19+
{% include after-content.html %}
20+
</div>
21+
22+
{% if site.search == true %}
23+
<div class="search-content">
24+
{% include_cached search/search_form.html %}
25+
</div>
26+
{% endif %}
27+
28+
<div id="footer" class="page__footer">
29+
<footer>
30+
{% include footer/custom.html %}
31+
{% include_cached footer.html %}
32+
</footer>
33+
</div>
34+
35+
{% include scripts.html %}
36+
</body>
37+
</html>

0 commit comments

Comments
 (0)