Add option to configure branch for github_edit_link

Offen
#264 1 Kommentar 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
github, jekyll, ruby
Bereich
tooling

Rechercherichtung

Start by locating the implementation and tests for the github_edit_link tag, then inspect how _config.yml values are read. Add support for a github_edit_branch setting and verify that generated edit links use the configured branch while preserving the existing default behavior.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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!

Vorherrschende Sprache
Ruby
Sterne
309
Forks
159
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus jekyll/github-metadata

Alle Issues in jekyll/github-metadata

Ähnliche Issues

Weitere Issues zu Ruby

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.