jreleaser / jreleaser.github.io

🌐 jreleaser.org website
4 stars 38 forks source link

Branch of Edit this page link #25

Closed gsmet closed 1 year ago

gsmet commented 2 years ago

In the Antora website, the Edit this page link is pointing to the main branch whereas you require the PRs to target development.

For instance here: https://jreleaser.org/guide/latest/configuration/release/github.html .

Not sure it's fixable though :).

aalmiray commented 2 years ago

Correct. I've noticed this and have yet to find a solution for it. Will have another look soon. Thanks for raising the issue.

gsmet commented 2 years ago

I wonder if something like that would work:

diff --git a/antora-playbook.yml b/antora-playbook.yml
index 9f53319..67aa9eb 100644
--- a/antora-playbook.yml
+++ b/antora-playbook.yml
@@ -10,6 +10,7 @@ content:
     - url: https://github.com/jreleaser/jreleaser.github.io.git
       branches: main
       start_path: docs
+      edit_url: '{web_url}/edit/development/{path}'
     - url: https://github.com/jreleaser/jreleaser.github.io.git
       branches: development
       start_path: docs
diff --git a/local-playbook.yml b/local-playbook.yml
index 24a017a..ae27e32 100644
--- a/local-playbook.yml
+++ b/local-playbook.yml
@@ -8,6 +8,7 @@ content:
     - url: https://github.com/jreleaser/jreleaser.github.io.git
       branches: main
       start_path: docs
+      edit_url: '{web_url}/edit/development/{path}'
     - url: ./
       branches: development
       start_path: docs

From https://docs.antora.org/antora/latest/playbook/content-edit-url/#edit-url-key .

Obviously, it's not perfect as you might end up on a non-existing page but since you don't want the PRs to target main anyway, that's probably better.

gsmet commented 2 years ago

Yeah it seems to work. I'll create a PR and let you decide if you want it or not.

aalmiray commented 1 year ago

Fixed by #26