Custom github link in config.toml


Hi all! My theme has the github URL for the site defined in the config.toml ( Each branch publishes to a different URL and I want the github URL to point to the correct branch. I have code that will dissect the branch from the URL ( but it doesn’t seem to me that I can just put this code in the config.toml.

Any ideas how to get the logic into the github URL specified in the config.toml?