Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Set relativeURL for Netlify #1612

Merged
merged 3 commits into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
languageCode = "en-us"
theme = "hugo-docs"
canonifyURLs = true
canonifyURLs = false

relativeURLs = true

[markup.goldmark.renderer]
unsafe = true
Expand Down
18 changes: 9 additions & 9 deletions docs/themes/hugo-docs/layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<head>
<meta charset="utf-8"> {{ partial "meta.html" . }}
<title>{{ .Title }}</title>
<link href="{{ .Site.BaseURL }}/css/nucleus.css" rel="stylesheet">
<link href="{{ .Site.BaseURL }}/css/font-awesome.min.css" rel="stylesheet">
<link href="{{ .Site.BaseURL }}/css/hybrid.css" rel="stylesheet">
<link href="{{ .Site.BaseURL }}/css/featherlight.min.css" rel="stylesheet">
<link href="{{ .Site.BaseURL }}/css/perfect-scrollbar.min.css" rel="stylesheet">
<link href="{{ .Site.BaseURL }}/css/theme.css" rel="stylesheet">
<link href="{{ .Site.BaseURL }}/css/hugo-theme.css" rel="stylesheet">
<link href='{{ relURL "/css/nucleus.css"}}' rel="stylesheet">
<link href='{{ relURL "/css/font-awesome.min.css"}}' rel="stylesheet">
<link href='{{ relURL "/css/hybrid.css"}}' rel="stylesheet">
<link href='{{ relURL "/css/featherlight.min.css"}}' rel="stylesheet">
<link href='{{ relURL "/css/perfect-scrollbar.min.css"}}' rel="stylesheet">
<link href='{{ relURL "/css/theme.css"}}' rel="stylesheet">
<link href='{{ relURL "/css/hugo-theme.css"}}' rel="stylesheet">
<style type="text/css">
:root #header + #content > #left > #rlblock_left {
display: none !important;
Expand Down Expand Up @@ -41,8 +41,8 @@ <h1>Error </h1>
</p>
<p>Woops. Looks like this page doesn't exist.</p>
<p></p>
<p><a href="{{.Site.BaseURL}}">Go to homepage</a></p>
<p><img src="{{ .Site.BaseURL }}/images/gopher-404.jpg" style="width:50%"></img></p>
<p><a href='{{relURL "/"}}'>Go to homepage</a></p>
<p><img src='{{ relURL "/images/gopher-404.jpg"}}' style="width:50%"></img></p>
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions docs/themes/hugo-docs/layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
}
</script>

<script src="{{ .Site.BaseURL }}/js/clipboard.min.js"></script>
<script src='{{ relURL "/js/clipboard.min.js"}}'></script>
<script
src='{{ .Site.BaseURL }}/js/dgraph.js?{{ md5 (readFile "themes/hugo-docs/static/js/dgraph.js") }}'
src='{{ relURL "/js/dgraph.js"}}?{{ md5 (readFile "themes/hugo-docs/static/js/dgraph.js") }}'
></script>
<script>
hljs.initHighlightingOnLoad();
Expand Down
2 changes: 1 addition & 1 deletion docs/themes/hugo-docs/layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</title>

<link
href='{{ .Site.BaseURL }}/css/theme.css?{{ md5 (readFile "themes/hugo-docs/static/css/theme.css") }}'
href='{{ relURL "/css/theme.css"}}?{{ md5 (readFile "themes/hugo-docs/static/css/theme.css") }}'
rel="stylesheet"
/>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
Expand Down
2 changes: 1 addition & 1 deletion docs/themes/hugo-docs/layouts/partials/topbar.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<nav id="header">
<a href="/" class="brand">
<img src="{{ .Site.BaseURL }}/images/badger.png" alt="dgraph" class="logo" />
<img src='{{ relURL "/images/badger.png"}}' alt="dgraph" class="logo" />
</a>

<a href="#" id="sidebar-toggle">
Expand Down
2 changes: 1 addition & 1 deletion docs/themes/hugo-docs/layouts/shortcodes/load-img.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $url := .Get 0}}
{{ $alt := .Get 1}}

<img src="{{ .Site.BaseURL }}{{ $url }}" alt="{{ $alt }}" />
<img src="{{ relURL $url }}" alt="{{ $alt }}" />