瀏覽代碼

Adds the ability to override the current css with a custom css file

tags/v1.0.0
JonasVHM 6 年之前
父節點
當前提交
8c527d6ed3
共有 3 個檔案被更改,包括 6 行新增0 行删除
  1. 1
    0
      exampleSite/config.toml
  2. 1
    0
      exampleSite/static/css/custom.css
  3. 4
    0
      layouts/partials/header.html

+ 1
- 0
exampleSite/config.toml 查看文件

@@ -45,6 +45,7 @@ theme = "meghna-hugo"
home= "Home"
logo = "images/logo.png"
gmapAPI = "https://maps.googleapis.com/maps/api/js?key=AIzaSyBI14J_PNWVd-m0gnUBkjmhoQyNyd7nllA"
custom_css = ["css/custom.css"]

# Banner Section
[params.banner]

+ 1
- 0
exampleSite/static/css/custom.css 查看文件

@@ -0,0 +1 @@


+ 4
- 0
layouts/partials/header.html 查看文件

@@ -28,6 +28,10 @@
<link rel="stylesheet" href="{{"plugins/slick-carousel/slick/slick-theme.css"|absURL}}">
{{"<!-- Main Stylesheet -->"|safeHTML}}
<link rel="stylesheet" href="{{"css/style.css"|absURL}}">
{{ "<!-- Custom CSS -->" | safeHTML }}
{{ range .Site.Params.custom_css }}
<link rel="stylesheet" href="{{ . | absURL }}">
{{ end }}

</head>
{{"<!-- body start -->" | safeHTML}}

Loading…
取消
儲存