Skip to content

Commit

Permalink
add [feature]: support .Site.Language.LanguageDirection
Browse files Browse the repository at this point in the history
  • Loading branch information
Jibec authored May 28, 2020
1 parent 882c5c7 commit 5ba20e1
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ showLastmod = true
taxonomyCloudShuffle = true
accentColor = "#ffcd00"
hideMainMenu = false
rtl = false

[params.sidebar]
enable = true
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/head/includes.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<link rel='icon' href='{{ ( or .Site.Params.assets.favicon "favicon.ico" ) | relURL }}'>
<link rel='stylesheet' href='{{ print "/assets/css/" .Site.Data.assets.main.css | relURL }}'>

{{- if .Site.Params.settings.rtl -}}
{{- if or ( .Site.Params.settings.rtl ) ( eq .Site.Language.LanguageDirection "rtl" ) -}}

This comment has been minimized.

Copy link
@CodeAunt

CodeAunt Oct 3, 2020

Cause Failure

execute of template failed: template: partials/head/includes.html:4:50: executing "partials/head/includes.html" at <.Site.Language.LanguageDirection>: can't evaluate field LanguageDirection in type *langs.Language
<link rel='stylesheet' href='{{ print "/assets/css/" .Site.Data.assets.rtl.css | relURL }}'>
{{- end -}}

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang='{{ .Site.Language.Lang }}'>
<html lang='{{ .Site.Language.Lang }}' dir='{{ .Site.Language.LanguageDirection | default "auto" }}'>

This comment has been minimized.

Copy link
@CodeAunt

CodeAunt Oct 3, 2020

Cause failure

 ... execute of template failed: template: partials/header.html:2:52: executing "partials/header.html" at <.Site.Language.LanguageDirection>: can't evaluate field LanguageDirection in type *langs.Language

{{- partial "head/head" . -}}

Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ command = "ln -s ${PWD} ../minimo && hugo --source=exampleSite --baseURL=${DEPLO

[build.environment]
HUGO_THEMESDIR = "../.."
HUGO_VERSION = "0.66.0"
HUGO_VERSION = "0.67.1"
2 changes: 1 addition & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ features = [
"utterances",
"widgets"
]
min_version = 0.65
min_version = 0.67

[author]
name = "Munif Tanjim"
Expand Down

0 comments on commit 5ba20e1

Please sign in to comment.