Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to configure branch for github_edit_link #264

Open
runphp opened this issue Sep 9, 2023 · 0 comments
Open

Add option to configure branch for github_edit_link #264

runphp opened this issue Sep 9, 2023 · 0 comments

Comments

@runphp
Copy link

runphp commented Sep 9, 2023

The github_edit_link tag currently generates edit links that point to the gh-pages branch by default. This is not ideal when using other default branches like main.
It would be helpful to have an option to configure the target branch for github_edit_link, so it can work properly for repositories using non-gh-pages default branches.

Proposal
Add a configuration option such as github_edit_branch to _config.yml:
yaml
github_edit_branch: main
This will make github_edit_link generate links pointing to that branch.
The user can then set this to main, master or other branches as needed.
This will provide more flexibility when using github_edit_link for repositories with different branch setups.

Benefits

  • Works for non-gh-pages default branch
  • Easy configuration in _config.yml
  • More flexibility for users
  • Links point to correct branch for editing

Please consider adding this option in a future release. Let me know if any clarification is needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant