Closed akaalharbi closed 2 years ago
Hi, from looking through your repository it seems like you aren't using the latest version of Wowchemy. You can update Wowchemy (https://wowchemy.com/docs/hugo-tutorials/update/) and this module should work correctly.
Alternatively, use the site_head.html
from the version you're using. (By looking at your go.mod
file it seems to be https://github.com/wowchemy/wowchemy-hugo-themes/blob/d13358e38feed9179a05617493359f52388e160b/wowchemy/layouts/partials/site_head.html)
add the following code right after the line {{ $style := slice $css_bundle_head $style | resources.Concat "css/wowchemy.css" }}
:
{{- $language_code := site.LanguageCode | default "en-us" -}}
{{- if in site.Data.i18n.rtl.rtl $language_code -}}
{{- $style = slice $style | resources.Concat "css/wowchemy-rtl.css" | resources.PostCSS (dict "use" "rtlcss" "noMap" true) -}}
{{- end -}}
You are amazing, I updated the wowchemy and it worked!
Also, in my case the effect took a place after writing .Site.Language.Lang
instead of site.LanguageCode
in this line {{- $language_code := site.LanguageCode | default "en-us" -}}
.
You are amazing, I updated the wowchemy and it worked!
That's great to hear!
Also, in my case the effect took a place after writing
.Site.Language.Lang
instead ofsite.LanguageCode
in this line{{- $language_code := site.LanguageCode | default "en-us" -}}
.
That's because in your config/_default/languages.yaml
file you wrote languageCode: /ar
instead of languageCode: ar
You should probably fix it, because in https://github.com/wowchemy/wowchemy-hugo-themes/blob/main/wowchemy/layouts/_default/baseof.html (and in other places) Wowchemy uses site.LanguageCode
too.
Thank you for making this module publicly available.
I tried using it with the repository personal website, where I added
layouts/partials/site_head.html
from site_head.htmlHowever, I received number of errors (see below for the full message). I tried to address the error
by calling
hugo gen chromastyles
but it did not work.Full message after running
hugo server