Commit 34c9dba 1 parent b8462a2 commit 34c9dba Copy full SHA for 34c9dba
File tree 2 files changed +3
-2
lines changed
netlify/plugins/netlify-jekyll-metadata
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 21
21
config : {
22
22
backend : {
23
23
repo : { { site . github . repository_nwo | jsonify } } ,
24
- branch : { { site . github . source . branch | jsonify } }
24
+ branch : { { site . branch | default : site . github . source . branch | jsonify } }
25
25
} ,
26
26
local_backend : { % if jekyll . environment == "production" % } false { % else % } true { % endif % } ,
27
27
site_url : { { "" | absolute_url | jsonify } }
Original file line number Diff line number Diff line change @@ -5,8 +5,9 @@ export const onPreBuild = async function () {
5
5
const siteUrl = process . env . URL
6
6
const repoUrl = new URL ( process . env . REPOSITORY_URL || '' )
7
7
const repoNameWithOwner = repoUrl . pathname . replace ( / ^ \/ + / , '' )
8
+ const branch = process . env . BRANCH
8
9
9
10
const fileName = '_config_override.yml'
10
- const fileContents = `repository: ${ repoNameWithOwner } \nurl: ${ siteUrl } \nbaseurl: ""`
11
+ const fileContents = `repository: ${ repoNameWithOwner } \nurl: ${ siteUrl } \nbranch: ${ branch } \ nbaseurl: ""`
11
12
return fs . promises . writeFile ( fileName , fileContents )
12
13
}
You can’t perform that action at this time.
0 commit comments