mirror of https://github.com/jpanther/congo.git
🏗️ Change URLs to be relative instead of absolute
parent
1a69b5fd39
commit
f6dceb6233
|
@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
- Fathom Analytics script included twice when using custom domain
|
- Fathom Analytics script included twice when using custom domain
|
||||||
- Recent heading on homepage profile layout misaligned
|
- Recent heading on homepage profile layout misaligned
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- URLs are relative by default which allows the theme to be more flexible in different deployment scenarios
|
||||||
|
|
||||||
## [1.2.0] - 2021-08-22
|
## [1.2.0] - 2021-08-22
|
||||||
### Added
|
### Added
|
||||||
- Multiple colour schemes
|
- Multiple colour schemes
|
||||||
|
|
|
@ -12,7 +12,6 @@ languageCode = "en-AU"
|
||||||
defaultContentLanguage = "en"
|
defaultContentLanguage = "en"
|
||||||
title = "Congo"
|
title = "Congo"
|
||||||
enableEmoji = true
|
enableEmoji = true
|
||||||
relativeURLs = true
|
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Congo"
|
name = "Congo"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<h2>
|
<h2>
|
||||||
<a
|
<a
|
||||||
class="text-xl font-medium hover:underline hover:underline-primary-500 hover:underline-offset-small"
|
class="text-xl font-medium hover:underline hover:underline-primary-500 hover:underline-offset-small"
|
||||||
href="{{ .Page.Permalink }}"
|
href="{{ .Page.RelPermalink }}"
|
||||||
>{{ .Page.Title }}</a
|
>{{ .Page.Title }}</a
|
||||||
>
|
>
|
||||||
{{ if $.Site.Params.taxonomy.showTermCount | default true }}
|
{{ if $.Site.Params.taxonomy.showTermCount | default true }}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a
|
<a
|
||||||
class="hover:underline hover:underline-primary-500 hover:underline-offset-small text-neutral-800 dark:text-neutral"
|
class="hover:underline hover:underline-primary-500 hover:underline-offset-small text-neutral-800 dark:text-neutral"
|
||||||
href="{{ .Permalink }}"
|
href="{{ .RelPermalink }}"
|
||||||
>{{ .Title }}</a
|
>{{ .Title }}</a
|
||||||
>
|
>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="flex justify-between pt-3">
|
<div class="flex justify-between pt-3">
|
||||||
<span>
|
<span>
|
||||||
{{ if .NextInSection }}
|
{{ if .NextInSection }}
|
||||||
<a class="flex" href="{{ .NextInSection.Permalink }}">
|
<a class="flex" href="{{ .NextInSection.RelPermalink }}">
|
||||||
<span class="mr-3 article-pagination-direction">←</span>
|
<span class="mr-3 article-pagination-direction">←</span>
|
||||||
<span class="flex flex-col">
|
<span class="flex flex-col">
|
||||||
<span class="article-pagination-title">{{ .NextInSection.Title }}</span>
|
<span class="article-pagination-title">{{ .NextInSection.Title }}</span>
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
{{ if .PrevInSection }}
|
{{ if .PrevInSection }}
|
||||||
<a class="flex text-right" href="{{ .PrevInSection.Permalink }}">
|
<a class="flex text-right" href="{{ .PrevInSection.RelPermalink }}">
|
||||||
<span class="flex flex-col">
|
<span class="flex flex-col">
|
||||||
<span class="article-pagination-title">{{ .PrevInSection.Title }}</span>
|
<span class="article-pagination-title">{{ .PrevInSection.Title }}</span>
|
||||||
<span class="-mt-1 text-xs text-neutral-400 dark:text-neutral-500">
|
<span class="-mt-1 text-xs text-neutral-400 dark:text-neutral-500">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
|
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
{{ with .Site.Author.image }}
|
{{ with .Site.Author.image }}
|
||||||
<img class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full" src="{{ . | absURL }}" />
|
<img class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full" src="{{ . | relURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div>
|
<div>
|
||||||
{{ with .Site.Author.name }}
|
{{ with .Site.Author.name }}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<li class="inline {{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }}">
|
<li class="inline {{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }}">
|
||||||
<a
|
<a
|
||||||
class="hover:underline hover:underline-neutral-300 dark:underline-neutral-600"
|
class="hover:underline hover:underline-neutral-300 dark:underline-neutral-600"
|
||||||
href="{{ .p1.Permalink }}"
|
href="{{ .p1.RelPermalink }}"
|
||||||
>{{ .p1.Title }}</a
|
>{{ .p1.Title }}</a
|
||||||
><span class="px-1 text-primary-500">/</span>
|
><span class="px-1 text-primary-500">/</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<link rel="canonical" href="{{ .Permalink }}" />
|
<link rel="canonical" href="{{ .Permalink }}" />
|
||||||
{{ range .AlternativeOutputFormats -}}
|
{{ range .AlternativeOutputFormats -}}
|
||||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{/* Styles */}}
|
{{/* Styles */}}
|
||||||
{{ $schemeCSS := resources.Get (printf "css/schemes/%s.css" (.Site.Params.colorScheme | default "congo")) }}
|
{{ $schemeCSS := resources.Get (printf "css/schemes/%s.css" (.Site.Params.colorScheme | default "congo")) }}
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
<link
|
<link
|
||||||
type="text/css"
|
type="text/css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="{{ $schemeStyles.Permalink }}"
|
href="{{ $schemeStyles.RelPermalink }}"
|
||||||
integrity="{{ $schemeStyles.Data.Integrity }}"
|
integrity="{{ $schemeStyles.Data.Integrity }}"
|
||||||
/>
|
/>
|
||||||
{{ $mainCSS := resources.Get "css/compiled/main.css" }}
|
{{ $mainCSS := resources.Get "css/compiled/main.css" }}
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
<link
|
<link
|
||||||
type="text/css"
|
type="text/css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="{{ $mainStyles.Permalink }}"
|
href="{{ $mainStyles.RelPermalink }}"
|
||||||
integrity="{{ $mainStyles.Data.Integrity }}"
|
integrity="{{ $mainStyles.Data.Integrity }}"
|
||||||
/>
|
/>
|
||||||
{{ $customCSS := resources.Get "css/custom.css" }}
|
{{ $customCSS := resources.Get "css/custom.css" }}
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
<link
|
<link
|
||||||
type="text/css"
|
type="text/css"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
href="{{ $customStyles.Permalink }}"
|
href="{{ $customStyles.RelPermalink }}"
|
||||||
integrity="{{ $customStyles.Data.Integrity }}"
|
integrity="{{ $customStyles.Data.Integrity }}"
|
||||||
/>
|
/>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -60,10 +60,10 @@
|
||||||
{{ if templates.Exists "partials/favicons.html" }}
|
{{ if templates.Exists "partials/favicons.html" }}
|
||||||
{{ partialCached "favicons.html" .Site }}
|
{{ partialCached "favicons.html" .Site }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | absURL }}" />
|
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}" />
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | absURL }}" />
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}" />
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | absURL }}" />
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}" />
|
||||||
<link rel="manifest" href="{{ "site.webmanifest" | absURL }}" />
|
<link rel="manifest" href="{{ "site.webmanifest" | relURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{/* Site Verification */}}
|
{{/* Site Verification */}}
|
||||||
{{ with .Site.Params.verification.google }}
|
{{ with .Site.Params.verification.google }}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<a
|
<a
|
||||||
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small"
|
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small"
|
||||||
rel="me"
|
rel="me"
|
||||||
href="{{ .Site.BaseURL }}"
|
href="{{ "/" | relURL }}"
|
||||||
>{{ .Site.Title }}</a
|
>{{ .Site.Title }}</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
<li class="mb-1 text-right sm:mb-0 sm:mr-7 sm:last:mr-0">
|
<li class="mb-1 text-right sm:mb-0 sm:mr-7 sm:last:mr-0">
|
||||||
<a
|
<a
|
||||||
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small"
|
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small"
|
||||||
href="{{ .URL | absURL }}"
|
href="{{ .URL }}"
|
||||||
title="{{ .Title }}"
|
title="{{ .Title }}"
|
||||||
>{{ .Name }}</a
|
>{{ .Name }}</a
|
||||||
>
|
>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
>
|
>
|
||||||
<header class="flex flex-col items-center mb-3">
|
<header class="flex flex-col items-center mb-3">
|
||||||
{{ with .Site.Author.image }}
|
{{ with .Site.Author.image }}
|
||||||
<img class="mb-2 rounded-full w-36 h-36" src="{{ . | absURL }}" />
|
<img class="mb-2 rounded-full w-36 h-36" src="{{ . | relURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<h1 class="text-4xl font-extrabold">
|
<h1 class="text-4xl font-extrabold">
|
||||||
{{ .Site.Author.name | default .Site.Title }}
|
{{ .Site.Author.name | default .Site.Title }}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"@context": "https://schema.org",
|
"@context": "https://schema.org",
|
||||||
"@type": "WebSite",
|
"@type": "WebSite",
|
||||||
"name": "{{ .Site.Title | safeJS }}",
|
"name": "{{ .Site.Title | safeJS }}",
|
||||||
"url": "{{ .Site.BaseURL | safeURL }}",
|
"url": "{{ (site.GetPage "/").Permalink | safeURL }}",
|
||||||
"description": "{{ .Site.Params.description | safeJS }}"
|
"description": "{{ .Site.Params.description | safeJS }}"
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{{- if .Get "link" -}}
|
{{- if .Get "link" -}}
|
||||||
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
|
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<img src="{{ $image.Permalink }}"
|
<img src="{{ $image.RelPermalink }}"
|
||||||
{{- if or (.Get "alt") (.Get "caption") }}
|
{{- if or (.Get "alt") (.Get "caption") }}
|
||||||
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify | plainify }}{{ end }}"
|
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify | plainify }}{{ end }}"
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
@ -25,5 +25,3 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</figure>
|
</figure>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "NODE_ENV=development ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
|
"dev": "NODE_ENV=development ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
|
||||||
"build": "NODE_ENV=production ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit",
|
"build": "NODE_ENV=production ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit",
|
||||||
"example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost -p 8008"
|
"example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/congo/ -p 8008"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
Loading…
Reference in New Issue