Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jpescador/hugo-future-imperfect.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Collins <thepatrickcollins@gmail.com>2017-11-13 03:29:57 +0300
committerGitHub <noreply@github.com>2017-11-13 03:29:57 +0300
commite90e70ea3f43698a3bf7d5bd09d830d3144bb67e (patch)
treebf9afb60185348720197d2e2271a280d299e58c8
parenteed150512ae2d4389dd313407930c33baab60f85 (diff)
Bug: absURL to relURL (#83)
* AbsURL to relURL * Adjust BaseURL * baseURL to relURL * Permalink to RelPermalink
-rw-r--r--exampleSite/content/blog/goisforlovers.md2
-rw-r--r--layouts/404.html2
-rw-r--r--layouts/_default/header.html4
-rw-r--r--layouts/about/list.html4
-rw-r--r--layouts/contact/list.html4
-rw-r--r--layouts/itemized/header.html4
-rw-r--r--layouts/partials/favicon.html10
-rw-r--r--layouts/partials/footer.html8
-rw-r--r--layouts/partials/header.html10
-rw-r--r--layouts/partials/navbar.html8
-rw-r--r--layouts/partials/sidebar.html2
-rw-r--r--layouts/post/content-list.html2
-rw-r--r--layouts/post/featured.html2
-rw-r--r--layouts/post/header.html4
-rw-r--r--layouts/post/prev-next.html4
-rw-r--r--layouts/post/staticman.html2
16 files changed, 34 insertions, 38 deletions
diff --git a/exampleSite/content/blog/goisforlovers.md b/exampleSite/content/blog/goisforlovers.md
index 2c8a8ab..56bdd85 100644
--- a/exampleSite/content/blog/goisforlovers.md
+++ b/exampleSite/content/blog/goisforlovers.md
@@ -239,7 +239,7 @@ instead of depending on the context.
```
{{ $title := .Site.Title }}
{{ range .Params.tags }}
-<li> <a href="{{ $baseurl }}/tags/{{ . | urlize }}">
+<li> <a href="/tags/{{ . | urlize }}">
{{ . }}</a> - {{ $title }} </li>
{{ end }}
```
diff --git a/layouts/404.html b/layouts/404.html
index 70ec93d..0f99996 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -243,7 +243,7 @@
</p>
</div>
<div class="buttons-container">
- <a class="border-button" href="{{ .Site.BaseURL }}">Go To Homepage</a>
+ <a class="border-button" href="{{ "/" | relURL }}">Go To Homepage</a>
<a class="border-button" href="mailto:{{ .Site.Social.email }}">Report A Problem</a>
</div>
</div>
diff --git a/layouts/_default/header.html b/layouts/_default/header.html
index f7184e7..a7ce7f5 100644
--- a/layouts/_default/header.html
+++ b/layouts/_default/header.html
@@ -1,10 +1,10 @@
<header>
<div class="title">
{{ if $.Scratch.Get "h1" }}
- <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
+ <h1><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{ $.Scratch.Set "h1" false }}
{{ else }}
- <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+ <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ end }}
{{ with .Description }}
<p>{{ . }}</p>
diff --git a/layouts/about/list.html b/layouts/about/list.html
index e821afd..8419bb5 100644
--- a/layouts/about/list.html
+++ b/layouts/about/list.html
@@ -8,10 +8,10 @@
<header>
<div class="title">
{{ if $.Scratch.Get "h1" }}
- <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
+ <h1><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{ $.Scratch.Set "h1" false }}
{{ else }}
- <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+ <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ end }}
{{ with .Description }}
<p>{{ . }}</p>
diff --git a/layouts/contact/list.html b/layouts/contact/list.html
index cc2f35b..7852587 100644
--- a/layouts/contact/list.html
+++ b/layouts/contact/list.html
@@ -8,10 +8,10 @@
<header>
<div class="title">
{{ if $.Scratch.Get "h1" }}
- <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
+ <h1><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{ $.Scratch.Set "h1" false }}
{{ else }}
- <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+ <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ end }}
{{ with .Description }}
<p>{{ . }}</p>
diff --git a/layouts/itemized/header.html b/layouts/itemized/header.html
index ec6307b..a50b2d7 100644
--- a/layouts/itemized/header.html
+++ b/layouts/itemized/header.html
@@ -1,10 +1,10 @@
<header>
<div class="title">
{{ if $.Scratch.Get "h1" }}
- <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
+ <h1><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{ $.Scratch.Set "h1" false }}
{{ else }}
- <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+ <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ end }}
{{ with .Description }}
<p>{{ . }}</p>
diff --git a/layouts/partials/favicon.html b/layouts/partials/favicon.html
index efea45b..a4f1d2e 100644
--- a/layouts/partials/favicon.html
+++ b/layouts/partials/favicon.html
@@ -8,14 +8,12 @@
{{ $favVer := $.Scratch.Get "favVer" }}
- <link rel="apple-touch-icon-precomposed"
- href='{{"/favicon/apple-touch-icon-precomposed" | relURL }}{{ $favVer }}.png'>
- <link rel="icon" href='{{"/favicon/favicon" | relURL }}{{ $favVer }}.png'>
+ <link rel="apple-touch-icon-precomposed" href='{{ "favicon/apple-touch-icon-precomposed" | relURL }}{{ $favVer }}.png'>
+ <link rel="icon" href='{{ "favicon/favicon" | relURL }}{{ $favVer }}.png'>
<!--[if IE]><link rel="shortcut icon" href='/favicon{{ $favVer }}.ico'><![endif]-->
<meta name="msapplication-TileColor" content="#da532c">
- <meta name="msapplication-TileImage"
- content='{{"/favicon/mstile" | relURL }}{{ $favVer }}.png'>
+ <meta name="msapplication-TileImage" content='{{ "favicon/mstile" | relURL }}{{ $favVer }}.png'>
<meta name="application-name" content="{{ .Site.Title }}">
<meta name="msapplication-tooltip" content="{{ .Site.Params.Description }}">
- <meta name="msapplication-config" content='{{ "/favicon/ieconfig.xml" | relURL }}'>
+ <meta name="msapplication-config" content='{{ "favicon/ieconfig.xml" | relURL }}'>
{{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index acd082d..7d1686c 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -15,15 +15,15 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/skel/3.0.1/skel.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.25/jquery.fancybox.min.js"></script>
- <script src="{{ "js/util.js" | absURL }}"></script>
- <script src="{{ "js/main.js" | absURL }}"></script>
- <script src="{{ "js/backToTop.js" | absURL }}"></script>
+ <script src="{{ "js/util.js" | relURL }}"></script>
+ <script src="{{ "js/main.js" | relURL }}"></script>
+ <script src="{{ "js/backToTop.js" | relURL }}"></script>
{{ end }}
{{ if ne ($.Scratch.Get "jsFiles") false }}
{{ range $.Scratch.Get "jsFiles" }}
{{ if ne . "default" }}
- <script src="{{ . | absURL }}"></script>
+ <script src="{{ . | relURL }}"></script>
{{ end }}
{{ end }}
{{ end }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index fba71a4..fe02f44 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -50,21 +50,19 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:400,800,900|Source+Sans+Pro:400,700">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.1.25/jquery.fancybox.min.css">
- <link rel="stylesheet" href="{{ "css/main.css" | absURL }}">
- <link rel="stylesheet" href="{{ "css/add-on.css" | absURL }}">
+ <link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
+ <link rel="stylesheet" href="{{ "css/add-on.css" | relURL }}">
{{ end }}
{{ if ne ($.Scratch.Get "cssFiles") false }}
{{ range $.Scratch.Get "cssFiles" }}
{{ if ne . "default" }}
- <link rel="stylesheet" href="{{ . | absURL }}">
+ <link rel="stylesheet" href="{{ . | relURL }}">
{{ end }}
{{ end }}
{{ end }}
- {{ if not (in (printf "%#v" .Site.BaseURL) "localhost") }}
- {{ template "_internal/google_analytics.html" . }}
- {{ end }}
+ {{ template "_internal/google_analytics.html" . }}
</head>
<body>
diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html
index 1f3c2bd..9641403 100644
--- a/layouts/partials/navbar.html
+++ b/layouts/partials/navbar.html
@@ -1,11 +1,11 @@
<!-- Header -->
<header id="header">
{{ if .IsHome }}
- <h1><a href="{{ .Site.BaseURL }}">{{ .Site.Params.navbarTitle }}</a></h1>
+ <h1><a href="{{ "/" | relURL }}">{{ .Site.Params.navbarTitle }}</a></h1>
{{ else if ne .Section "" }}
- <h1><a href="{{ .Site.BaseURL }}">{{ .Section }}</a></h1>
+ <h1><a href="{{ "/" | relURL }}">{{ .Section }}</a></h1>
{{ else }}
- <h1><a href="{{ .Site.BaseURL }}">{{ .Title }}</a></h1>
+ <h1><a href="{{ "/" | relURL }}">{{ .Title }}</a></h1>
{{ end }}
<nav class="links">
@@ -83,7 +83,7 @@
{{ range first ($.Scratch.Get "postLimit") (where ($.Scratch.Get "recentPosts") "Type" "post") }}
<article class="mini-post">
<header>
- <h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
+ <h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
{{ $.Scratch.Set "dateType" .Date }}
<time class="published" datetime=
'{{ ($.Scratch.Get "dateType").Format "2006-01-02" }}'>
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index db36002..f946b01 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -50,7 +50,7 @@
<article class="mini-post">
<header>
<h3>
- <a href="{{ .Permalink }}">{{ .Title }}</a>
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a>
</h3>
{{ $.Scratch.Set "dateType" .Date }}
<time class="published" datetime='{{ ($.Scratch.Get "dateType").Format "2006-01-02" }}'>
diff --git a/layouts/post/content-list.html b/layouts/post/content-list.html
index 32c4bcf..5662909 100644
--- a/layouts/post/content-list.html
+++ b/layouts/post/content-list.html
@@ -5,7 +5,7 @@
<footer>
<ul class="actions">
- <li><a href="{{ .Permalink }}" class="button big">Continue Reading</a></li>
+ <li><a href="{{ .RelPermalink }}" class="button big">Continue Reading</a></li>
</ul>
{{ .Render "footer-category" }}
</footer>
diff --git a/layouts/post/featured.html b/layouts/post/featured.html
index fd7df7b..95376a5 100644
--- a/layouts/post/featured.html
+++ b/layouts/post/featured.html
@@ -8,7 +8,7 @@
{{ $alt := $.Scratch.Get "alt" }}
{{ $img := $.Scratch.Get "img" }}
- <a href="{{ .Permalink }}" class="image featured">
+ <a href="{{ .RelPermalink }}" class="image featured">
<img src="{{ $path | relURL }}/{{ .Params.featured }}" alt="{{ $alt }}">
</a>
{{ end }}
diff --git a/layouts/post/header.html b/layouts/post/header.html
index e500a35..6ffe2b1 100644
--- a/layouts/post/header.html
+++ b/layouts/post/header.html
@@ -1,10 +1,10 @@
<header>
<div class="title">
{{ if $.Scratch.Get "h1" }}
- <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
+ <h1><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
{{ $.Scratch.Set "h1" false }}
{{ else }}
- <h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
+ <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
{{ end }}
{{ with .Description }}
<p>{{ . }}</p>
diff --git a/layouts/post/prev-next.html b/layouts/post/prev-next.html
index 64b56de..f9b2cd2 100644
--- a/layouts/post/prev-next.html
+++ b/layouts/post/prev-next.html
@@ -1,11 +1,11 @@
<ul class="actions pagination">
{{ if .PrevInSection }}
- <li><a href="{{ .PrevInSection.Permalink }}"
+ <li><a href="{{ .PrevInSection.RelPermalink }}"
class="button big previous">{{ .PrevInSection.Title }}</a></li>
{{ end }}
{{ if .NextInSection }}
- <li><a href="{{ .NextInSection.Permalink }}"
+ <li><a href="{{ .NextInSection.RelPermalink }}"
class="button big next">{{ .NextInSection.Title }}</a></li>
{{ end }}
</ul>
diff --git a/layouts/post/staticman.html b/layouts/post/staticman.html
index 955846b..df759b4 100644
--- a/layouts/post/staticman.html
+++ b/layouts/post/staticman.html
@@ -2,7 +2,7 @@
{{ with .Site.Params.staticman }}
<form class="post-new-comment" method="POST" action="https://dev.staticman.net/v2/entry/{{ .username }}/{{ .repo }}/{{ .branch }}/comments">
{{ end }}
- <input type="hidden" name="options[redirect]" value="{{ .Permalink }}">
+ <input type="hidden" name="options[redirect]" value="{{ .RelPermalink }}">
<input type="hidden" name="options[entryId]" value="{{ .UniqueID }}">
<input required name="fields[name]" type="text" placeholder="Your name (Required)">
<input name="fields[website]" type="text" placeholder="Your website">