mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 02:14:21 +00:00
fix: "Edit Page" links for multilingual sites
Fix #1232 Fix https://github.com/sourcethemes/academic-www/issues/14
This commit is contained in:
1 parent
037d75f6da
commit
15e00e60de
1 file changed
+2
-1
@@ -1,7 +1,8 @@
|
||||
{{ if site.Params.edit_page }}{{/* Make `edit_page` optional in `params.toml` - prevent errors if it's removed. */}}
|
||||
{{ if site.Params.edit_page.repo_url | and (index site.Params.edit_page.editable .Type) | and (ne .Params.editable false) | or .Params.editable }}
|
||||
{{ $content_subfolder := cond site.IsMultiLingual (cond (ne .Site.LanguagePrefix "") (printf "%s/" .Site.LanguagePrefix) "") "" }}
|
||||
<p class="edit-page">
|
||||
<a href="{{site.Params.edit_page.repo_url}}/edit/{{site.Params.edit_page.repo_branch | default "master"}}/content/{{.File.Path}}">
|
||||
<a href="{{site.Params.edit_page.repo_url}}/edit/{{site.Params.edit_page.repo_branch | default "master"}}/content/{{$content_subfolder}}{{.File.Path}}">
|
||||
<i class="fas fa-pen pr-2"></i>{{ i18n "edit_page" | default "Edit this page" }}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
Reference in new issue
Block a user