diff --git a/assets/js/index.js b/assets/js/index.js index 28808a8..8c87d5f 100644 --- a/assets/js/index.js +++ b/assets/js/index.js @@ -86,7 +86,7 @@ Source: {{ range $index, $page := (where .Site.Pages "Section" "docs") -}} { id: {{ $index }}, - href: "{{ .Permalink | absURL }}", + href: "{{ .RelPermalink | relURL }}", title: {{ .Title | jsonify }}, description: {{ .Params.description | jsonify }}, content: {{ .Content | jsonify }} diff --git a/config/_default/config.toml b/config/_default/config.toml index 3277bb0..c800d6f 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -1,4 +1,5 @@ baseurl = "/" +canonifyURLs = false disableAliases = true disableHugoGeneratorInject = true enableEmoji = true @@ -72,7 +73,7 @@ rel = "sitemap" [taxonomies] contributor = "contributors" -[permalinks] +[RelPermalinks] blog = "/blog/:title/" [module] diff --git a/config/next/config.toml b/config/next/config.toml new file mode 100644 index 0000000..bf4bbcd --- /dev/null +++ b/config/next/config.toml @@ -0,0 +1,2 @@ +baseurl = "https://doks-next.netlify.app/" +canonifyURLs = true diff --git a/config/production/config.toml b/config/production/config.toml index 58155ea..c4ca660 100644 --- a/config/production/config.toml +++ b/config/production/config.toml @@ -1 +1,2 @@ -baseurl = "/" +baseurl = "https://doks.netlify.app/" +canonifyURLs = true diff --git a/config/staging/.gitkeep b/config/staging/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/content/docs/prologue/introduction.md b/content/docs/prologue/introduction.md index 1766779..64483e4 100644 --- a/content/docs/prologue/introduction.md +++ b/content/docs/prologue/introduction.md @@ -27,7 +27,7 @@ Step-by-step instructions on how to start a new Doks project. [Tutorial →](htt {{< alert icon="👉" text="The Quick Start is intended for intermediate to advanced users." >}} -One page summary of how to start a new Doks project. [Quick Start →]({{< ref "quick-start" >}}) +One page summary of how to start a new Doks project. [Quick Start →]({{< relref "quick-start" >}}) ## Go further @@ -55,4 +55,4 @@ Find out how to contribute to Doks. [Contributing →](https://getdoks.org/docs/ ## Help -Get help on Doks. [Help →]({{< ref "how-to-update" >}}) +Get help on Doks. [Help →]({{< relref "how-to-update" >}}) diff --git a/content/docs/prologue/quick-start.md b/content/docs/prologue/quick-start.md index a516f2a..6b6c25c 100644 --- a/content/docs/prologue/quick-start.md +++ b/content/docs/prologue/quick-start.md @@ -57,4 +57,4 @@ Doks will start the Hugo development webserver accessible by default at `http:// ## Other commands -Doks comes with commands for common tasks. [Commands →]({{< ref "commands" >}}) +Doks comes with commands for common tasks. [Commands →]({{< relref "commands" >}}) diff --git a/content/privacy-policy/index.md b/content/privacy-policy/index.md index e95fd9f..6315024 100644 --- a/content/privacy-policy/index.md +++ b/content/privacy-policy/index.md @@ -31,6 +31,6 @@ We run [Plausible](https://plausible.io/) analytics on getdoks.org. The followin ## Contact us -[Contact us]({{< ref "contact/index.md" >}}) if you have any questions. +[Contact us]({{< relref "contact/index.md" >}}) if you have any questions. Effective Date: _27th August 2020_ diff --git a/layouts/_default/index.js b/layouts/_default/index.js index 2dd84f7..9f764f9 100644 --- a/layouts/_default/index.js +++ b/layouts/_default/index.js @@ -4,7 +4,7 @@ var docs = [ id: {{ $index }}, title: "{{ .Title }}", description: "{{ .Params.description }}", - href: "{{ .URL | absURL }}" + href: "{{ .URL | relURL }}" }, {{ end -}} ]; \ No newline at end of file diff --git a/layouts/_default/index.json b/layouts/_default/index.json index b1997c8..6842871 100644 --- a/layouts/_default/index.json +++ b/layouts/_default/index.json @@ -1,5 +1,5 @@ {{- $.Scratch.Add "index" slice -}} {{- range .Site.RegularPages -}} - {{- $.Scratch.Add "index" (dict "title" .Title "description" .Params.description "contents" .Plain "permalink" .Permalink) -}} + {{- $.Scratch.Add "index" (dict "title" .Title "description" .Params.description "contents" .Plain "RelPermalink" .RelPermalink) -}} {{- end -}} {{- $.Scratch.Get "index" | jsonify -}} \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b746aa9..1401ccd 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -3,7 +3,7 @@
{{ .Params.lead | safeHTML }}
{{ partial "main/blog-meta.html" . -}}{{ .Params.lead | safeHTML }}
{{ partial "main/blog-meta.html" . -}} diff --git a/layouts/docs/list.html b/layouts/docs/list.html index 9bc9b30..c860531 100644 --- a/layouts/docs/list.html +++ b/layouts/docs/list.html @@ -7,10 +7,10 @@