Commit 48e2d29 1 parent 7674ce7 commit 48e2d29 Copy full SHA for 48e2d29
File tree 1 file changed +7
-3
lines changed
netlify/plugins/netlify-jekyll-metadata
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1
1
import fs from 'node:fs'
2
- import url from 'node:url'
3
2
4
3
export const onPreBuild = async function ( ) {
5
4
const siteUrl = process . env . URL
6
5
const repoUrl = new URL ( process . env . REPOSITORY_URL || '' )
7
6
const repoNameWithOwner = repoUrl . pathname . replace ( / ^ \/ + / , '' )
8
7
const branch = process . env . BRANCH
9
8
10
- const fileContents = `repository: ${ repoNameWithOwner } \nurl: ${ siteUrl } \nbranch: ${ branch } \nbaseurl: ""`
9
+ const fileContents = `
10
+ repository: ${ repoNameWithOwner }
11
+ url: ${ siteUrl }
12
+ branch: ${ branch }
13
+ baseurl: ""
14
+ `
11
15
const fileName = '_config.ci.yml'
12
- return fs . promises . writeFile ( fileName , fileContents )
16
+ return fs . promises . writeFile ( fileName , fileContents . trim ( ) )
13
17
}
You can’t perform that action at this time.
0 commit comments