Commit 2de5030e authored by key-amb's avatar key-amb
Browse files

Change / Use .IsHome to detect if current page is site home or not

parent cdc869c0
<!DOCTYPE html>
{{ $baseUrl := .Site.BaseURL }}
{{ $isHomePage := eq .Title .Site.Title }}
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="alternate" href="/index.xml" type="application/rss+xml" title="{{ .Site.Title }}">
<link rel="icon" href="{{ $baseUrl }}/favicon.ico">
<title>{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}</title>
<title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
<!--<link href="http://fonts.googleapis.com/css?family=PT+Sans:400,700" rel="stylesheet" type="text/css">-->
<link rel="stylesheet" href="{{ $baseUrl }}/css/highlight/{{ with .Site.Params.highlightStyle }}{{ . }}{{ else }}default{{ end }}.css">
<link rel="stylesheet" href="{{ $baseUrl }}/css/bootstrap.min.css">
......@@ -32,7 +31,7 @@
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li {{ if eq $isHomePage true }}class="active"{{ end }}><a href="{{ $baseUrl }}/">Home</a></li>
<li {{ if .IsHome }}class="active"{{ end }}><a href="{{ $baseUrl }}/">Home</a></li>
{{ $url := .Permalink }}
{{ with .Site.Params.mainMenu }}
{{ range $menu := . }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment