Skip to content

Conversation

bhitney
Copy link
Contributor

@bhitney bhitney commented Mar 22, 2021

Added github_branch parameter to config to support branch name on edit link on editable.html.

Added github_branch parameter to config to support branch name on edit link on editable.html.
@vsoch
Copy link
Owner

vsoch commented Mar 22, 2021

This is a great addition! Will you please bump the VERSION file from 0.0.21 to 0.0.22 and add a note to the changelog markdown?

@bhitney
Copy link
Contributor Author

bhitney commented Mar 22, 2021

Sure, should be all set!

@vsoch
Copy link
Owner

vsoch commented Mar 22, 2021

This is a nitpick / question - but do you think GitHub / others are moving toward main, and perhaps the default should be main to encourage that?

@bhitney
Copy link
Contributor Author

bhitney commented Mar 22, 2021

Yes -- the default should be main over master when creating a new repo. But, I left it master because it would break the edit page link for anyone still on master until they update their config. I'd recommend leaving it master unless there are very few theme users and everyone is ok with the break, or perhaps make it default in the next major release where multiple breaking changes can be rolled up in one release.

All that said, there could be a better way of determining branch -- I didn't see it in any of the variables but not an expert on this, so this this seemed like an easy solution. :)

@vsoch
Copy link
Owner

vsoch commented Mar 22, 2021

That works for me! A lot of projects are still using master, so we can just address this in the future when main is more standard.

@vsoch vsoch merged commit 57615ce into vsoch:master Mar 22, 2021
@bhitney
Copy link
Contributor Author

bhitney commented Mar 22, 2021

Thank you! Although I just realized -- if someone uses this as a remote theme and does not have github_branch in their local _config.yml file, will the remote github_branch setting (currently master) persist? I didn't test that scenario.

@vsoch
Copy link
Owner

vsoch commented Mar 22, 2021

Yeah we could add {% if site.github_branch %}{{ site.github_branch }}{% else %}master{% endif %}

@vsoch
Copy link
Owner

vsoch commented Mar 22, 2021

See #43

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

Successfully merging this pull request may close these issues.

2 participants