Merge pull request #56 from dongorgan/main

Remove `.Site.BaseURL`
This commit is contained in:
Somrat 2023-11-13 08:46:41 +06:00 committed by GitHub
commit fef42e15aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -1,13 +1,13 @@
{{ $context := .Context }}
{{ $class := .Class }}
{{ $base := site.BaseURL }}
{{ $base := site.Home.Permalink }}
<ul class="{{ $class }} inline-flex space-x-1 capitalize">
<li>
<a
class="text-primary dark:text-darkmode-primary"
href="{{ $base | relLangURL }}">
href="{{ $base }}">
{{ i18n "home" | default "Home" }}
</a>
<span class="inlin-block mr-1">/</span>

View File

@ -2,7 +2,7 @@
{{ $class := .Class }}
{{ $context := .Context }}
{{ $pageLang := $context.Lang }}
{{ $base:= urls.Parse site.BaseURL }}
{{ $base:= urls.Parse site.Home.Permalink }}
{{ $siteLanguages := site.Home.AllTranslations }}
{{ $pageLink := replace (replace $context.RelPermalink (add $pageLang "/") "") $base.Path "/" }}

View File

@ -5,7 +5,7 @@
<!-- navbar brand/logo -->
<a
class="navbar-brand inline-block"
href="{{ site.BaseURL | relLangURL }}">
href="{{ site.Home.RelPermalink }}">
{{ partial "logo" }}
</a>
</div>
@ -19,7 +19,7 @@
{{ end }}
href="{{ if findRE `^#` .URL }}
{{ if not $.IsHome }}
{{ site.BaseURL | relLangURL }}
{{ site.Home.RelPermalink }}
{{ end }}{{ .URL }}
{{ else }}
{{ .URL | relLangURL }}

View File

@ -4,7 +4,7 @@
<!-- logo -->
<div class="order-0">
<!-- navbar brand/logo -->
<a class="navbar-brand block" href="{{ site.BaseURL | relLangURL }}">
<a class="navbar-brand block" href="{{ site.Home.RelPermalink }}">
{{ partial "logo" }}
</a>
</div>
@ -64,7 +64,7 @@
{{ end }}
href="{{- if findRE `^#` .URL -}}
{{- if not $.IsHome -}}
{{- site.BaseURL | relLangURL -}}
{{- site.Home.RelPermalink -}}
{{- end }}
{{- .URL -}}
{{- else -}}
@ -85,7 +85,7 @@
{{ end }}
href="{{- if findRE `^#` .URL -}}
{{- if not $.IsHome -}}
{{- site.BaseURL | relLangURL -}}
{{- site.Home.RelPermalink -}}
{{- end }}{{- .URL -}}
{{- else -}}
{{- .URL | relLangURL -}}