Browse Source

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

tags/v1.0.0
JonasVHM 6 years ago
parent
commit
8c527d6ed3
3 changed files with 6 additions and 0 deletions
  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 View File

@@ -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 View File

@@ -0,0 +1 @@


+ 4
- 0
layouts/partials/header.html View File

@@ -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…
Cancel
Save