From ee6cef97ca0981972e4265baf3ea92b967d4ac0b Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Tue, 23 Jul 2019 09:38:51 +0200 Subject: [PATCH 1/2] Allow to specify branch of git repository --- exampleSite/config/_default/params.toml | 2 +- layouts/partials/edit_page.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index bc21a1d7..dff89c14 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -45,7 +45,7 @@ privacy_pack = false # Enable visitors to edit pages? # `repo` defines the repository URL. `editable` defines which page types can be edited. -edit_page = {repo_url = "https://github.com/gcushen/hugo-academic", editable = {docs = true, page = false, post = false}} +edit_page = {repo_url = "https://github.com/gcushen/hugo-academic", repo_branch = "master", editable = {docs = true, page = false, post = false}} # Date and time format (refer to https://sourcethemes.com/academic/docs/customization/#date-format ) # Examples: "Mon, Jan 2, 2006" or "2006-01-02" diff --git a/layouts/partials/edit_page.html b/layouts/partials/edit_page.html index 6a55528e..769ab18c 100644 --- a/layouts/partials/edit_page.html +++ b/layouts/partials/edit_page.html @@ -1,6 +1,6 @@ {{ if site.Params.edit_page.repo_url | and (index site.Params.edit_page.editable .Type) | and (ne .Params.editable false) | or .Params.editable }}

- + {{ i18n "edit_page" | default "Edit this page" }}

From 6dfa6c74601ff3195186931f1a1eb21a834e089d Mon Sep 17 00:00:00 2001 From: George Date: Tue, 23 Jul 2019 09:24:33 +0100 Subject: [PATCH 2/2] refactor spacing --- layouts/partials/edit_page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/edit_page.html b/layouts/partials/edit_page.html index 769ab18c..117baf53 100644 --- a/layouts/partials/edit_page.html +++ b/layouts/partials/edit_page.html @@ -1,6 +1,6 @@ {{ if site.Params.edit_page.repo_url | and (index site.Params.edit_page.editable .Type) | and (ne .Params.editable false) | or .Params.editable }}

- + {{ i18n "edit_page" | default "Edit this page" }}