Sass
- 新建一個SASS檔,放在
assets
資料夾下面下 - 在佈景的
partials\head.html
的<head>
裡加入下面程式碼 2.1toCSS
: 將sass轉成css 2.2minify
: 壓縮CSS 2.3fingerprint
:檔名加上hashcode,避免抓到舊的css檔
{{ $styles := resources.Get "sass/main.sass" }}
<link rel="stylesheet" href="{ $styles.RelPermalink }" integrity="{ $styles.Data.Integrity }">
- { } → {{ }}
| toCSS | minify | fingerprint