Use .BaseURL instead of .BaseUrl

Closes #2
This commit is contained in:
Nishanth Shanmugham
2015-11-08 22:48:12 -06:00
parent b28392d6d9
commit 994913289e
2 changed files with 4 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
<head> <head>
{{ partial "meta.html" . }} {{ partial "meta.html" . }}
<base href="{{ .Site.BaseUrl }}"> <base href="{{ .Site.BaseURL }}">
<title> <title>
{{ $url := replace .Permalink ( printf "%s" .Site.BaseUrl) "" }} {{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ if eq $url "/" }} {{ if eq $url "/" }}
{{ .Site.Title }} {{ .Site.Title }}
{{ else }} {{ else }}

View File

@@ -1,8 +1,8 @@
<!-- HTTPS --> <!-- HTTPS -->
<script type="text/javascript"> <script type="text/javascript">
var baseUrl = '{{ .Site.BaseUrl }}'; var baseURL = '{{ .Site.BaseURL }}';
var host = baseUrl.substring(0, baseUrl.length - 1).replace(/\//g, ''); var host = baseURL.substring(0, baseURL.length - 1).replace(/\//g, '');
if ((host === window.location.host) && (window.location.protocol !== 'https:')) { if ((host === window.location.host) && (window.location.protocol !== 'https:')) {
window.location.protocol = 'https:'; window.location.protocol = 'https:';
} }