File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -126,12 +126,12 @@ function formatReadme (module) {
126
126
// Resolve relative URLs in READMEs for images and anchors
127
127
$ ( 'a:not([href^=http]):not([href^=#])' ) . each ( function ( i , el ) {
128
128
var $a = $ ( el )
129
- $a . attr ( 'href' , 'http://github.com/' + module . path + '/blob/master/' + ( module . subpath || '' ) + $a . attr ( 'href' ) )
129
+ $a . attr ( 'href' , 'http://github.com/' + module . path + '/blob/master/' + ( module . subpath ? `docs/ ${ module . subpath } /../` : '' ) + $a . attr ( 'href' ) )
130
130
} )
131
131
132
132
$ ( 'img:not([src^=http])' ) . each ( function ( i , el ) {
133
133
var $img = $ ( el )
134
- $img . attr ( 'src' , 'https://raw.githubusercontent.com/' + module . path + '/master/' ( module . subpath || '' ) + $img . attr ( 'src' ) )
134
+ $img . attr ( 'src' , 'https://raw.githubusercontent.com/' + module . path + '/master/' ( module . subpath ? `docs/ ${ module . subpath } /../` : '' ) + $img . attr ( 'src' ) )
135
135
} )
136
136
137
137
// guarantee that the first heading is an <h1>,
@@ -140,7 +140,7 @@ function formatReadme (module) {
140
140
if ( headings && headings [ 0 ] && module . path ) {
141
141
$ ( headings [ 0 ] ) . replaceWith ( $ (
142
142
'<h1 class="title">'
143
- + '<a target="_blank" href="https://github.com/' + module . path + ( module . subpath ? `/blob/master/${ module . subpath } .md` : '' ) + '">'
143
+ + '<a target="_blank" href="https://github.com/' + module . path + ( module . subpath ? `/blob/master/docs/ ${ module . subpath } .md` : '' ) + '">'
144
144
+ $ ( headings [ 0 ] ) . text ( )
145
145
+ '</a>'
146
146
+ '<div class="contrib"></div>'
You can’t perform that action at this time.
0 commit comments