Commit 14676c2c authored by key-amb's avatar key-amb
Browse files

Add baseUrl to all links

parent 87f09805
......@@ -3,11 +3,11 @@
<div class="row">
<div class="col-sm-8 doc-main">
<main role="main">
<article itemscope itemtype="http://schema.org/BlogPosting">
<article>
<a id="title"></a>
<h1 class="entry-title" itemprop="headline">{{ .Title }}</h1>
<span class="entry-meta"><time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time></span>
<section itemprop="entry-text">
<h1 class="entry-title">{{ .Title }}</h1>
<span class="entry-meta"><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 02, 2006" }}</time></span>
<section>
{{ .Content }}
</section>
</article>
......
{{ $baseUrl := .Site.BaseUrl }}
{{ partial "header.html" . }}
<main role="main">
......@@ -35,7 +36,7 @@
<hr />
<div class="row doc-main text-center">
<a href="/post">See posts for {{ .Site.Title }}</a>
<a href="{{ $baseUrl }}/post">See posts for {{ .Site.Title }}</a>
</div>
</main>
......
<hr />
<div class="row">
<div class="col-sm-8">
<p class="doc-footer-em"><a href="#">Back to TOP</a></p>
</div>
</div>
</div> <!-- /.container -->
<footer class="doc-footer">
<p class="doc-footer-em">
<a href="#">Back to TOP</a>
</p>
{{ with .Site.Params.repositoryUrl }}<p class="doc-footer-em">Browse <strong><a href="{{ . }}">Repository</a></strong></p>{{ end }}
<p>{{ .Site.Copyright }}</p>
{{ with .Site.Copyright }}<p>{{ .Site.Copyright }}</p>{{ end }}
<p>Powered by <strong><a href="https://github.com/key-amb/hugo-theme-bootie-docs">Bootie Docs</a></strong> - theme for <a href="http://gohugo.io/">Hugo</a> by <a href="https://github.com/key-amb/">key-amb</a>.</p>
</footer>
......
<!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="http://getbootstrap.com/favicon.ico">
<title>{{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}</title>
<title>{{ .Title }}{{ if eq $isHomePage false }} - {{ .Site.Title }}{{ end }}</title>
<!--<link href="http://fonts.googleapis.com/css?family=PT+Sans:400,700" rel="stylesheet" type="text/css">-->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap-theme.css">
<link rel="stylesheet" href="/css/theme.css">
<link rel="stylesheet" href="/css/bootie-docs.css">
<link rel="stylesheet" href="{{ $baseUrl }}/css/bootstrap.min.css">
<link rel="stylesheet" href="{{ $baseUrl }}/css/bootstrap-theme.css">
<link rel="stylesheet" href="{{ $baseUrl }}/css/theme.css">
<link rel="stylesheet" href="{{ $baseUrl }}/css/bootie-docs.css">
</head>
<body role="document">
......@@ -25,21 +27,21 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">{{ .Site.Title }}</a>
<a class="navbar-brand" href="{{ $baseUrl }}/">{{ .Site.Title }}</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li {{ if eq $isHomePage true }}class="active"{{ end }}><a href="/">Home</a></li>
{{ if isset .Site.Params "mainMenu" }}
{{ range $item := .Site.Params.mainMenu }}
<li><a href="/{{ $item }}">{{ title $item}}</a></li>
<li><a href="{{ $baseUrl }}/{{ $item }}">{{ title $item}}</a></li>
{{ end }}
{{ end }}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Categories<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
{{ range $name, $taxonomy := .Site.Taxonomies.categories }}
<li><a href="/categories/{{ $name | urlize }}">{{ title $name }}</a></li>
<li><a href="{{ $baseUrl }}/categories/{{ $name | urlize }}">{{ title $name }}</a></li>
{{ end }}
</ul>
</li> </ul>
......
{{ $baseUrl := .Site.BaseUrl }}
<div class="col-sm-3 col-sm-offset-1 doc-sidebar">
<div class="sidebar-module">
<h4>Categories</h4>
<ul class="list-unstyled">
{{ range $name, $taxonomy := .Site.Taxonomies.categories }}
<li><a class="tag-item" href="/categories/{{ $name | urlize }}">{{ $name }}</a></li>
<li><a class="tag-item" href="{{ $baseUrl }}/categories/{{ $name | urlize }}">{{ $name }}</a></li>
{{ end }}
</ul>
</div>
......@@ -11,7 +12,7 @@
<h4>Tags</h4>
<div class="tag-box">
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
<a class="tag-item" href="/tags/{{ $name | urlize }}">{{ $name }}</a>
<a class="tag-item" href="{{ $baseUrl }}/tags/{{ $name | urlize }}">{{ $name }}</a>
{{ end }}
</div>
</div>
......
{{ $baseUrl := .Site.BaseUrl }}
<div class="col-sm-3 col-sm-offset-1 doc-sidebar">
<div class="sidebar-module">
<div class="sidebar-toc">
......@@ -12,7 +13,7 @@
<h4>Tags</h4>
<div class="tag-box">
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
<a class="tag-item" href="/tags/{{ $name | urlize }}">{{ $name }}</a>
<a class="tag-item" href="{{ $baseUrl }}/tags/{{ $name | urlize }}">{{ $name }}</a>
{{ end }}
</div>
</div>
......
Supports Markdown
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