File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const imageAltText: string = 'Screenshot from a terminal window running the "cac
19
19
const repoUrl : string = 'https://github.com/eliashaeussler/cache-warmup' ;
20
20
// @ts -ignore
21
21
const rootPath : string = path . resolve ( __dirname , '..' ) ;
22
- const replacer = new RepoLinkReplacer ( repoUrl , rootPath ) ;
22
+ const replacer = new RepoLinkReplacer ( repoUrl , rootPath , version ) ;
23
23
24
24
export default defineConfig ( {
25
25
title : title ,
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export class RepoLinkReplacer
6
6
constructor (
7
7
private readonly repoUrl : string ,
8
8
private readonly rootPath : string ,
9
+ private readonly gitReference : string ,
9
10
) { }
10
11
11
12
public replaceLink ( link : string , templatePath : string ) : string
@@ -22,7 +23,7 @@ export class RepoLinkReplacer
22
23
return link ;
23
24
}
24
25
25
- const blobUrl = `${ this . repoUrl } /blob/main /${ relativePath . substring ( 3 ) } ` ;
26
+ const blobUrl = `${ this . repoUrl } /blob/${ this . gitReference } /${ relativePath . substring ( 3 ) } ` ;
26
27
27
28
if ( process . env . NODE_ENV !== 'production' ) {
28
29
console . log ( `Replaced link: ${ link } → ${ blobUrl } ` ) ;
You can’t perform that action at this time.
0 commit comments