File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,17 +65,15 @@ let config = module.exports = {
6565 handlers : require ( './handlers' )
6666} ;
6767
68- let repos = require ( 'engine/koa/tutorial/repos' ) ;
69- for ( let repo in repos ) {
70- if ( repos [ repo ] . lang === lang ) {
71- config . tutorialRepo = {
72- github : repo ,
73- branch : repos [ repo ] . branch || 'master' ,
74- tree : new URL ( 'https://github.com/' + repo + '/tree/' + ( repos [ repo ] . branch || 'master' ) ) ,
75- blob : new URL ( 'https://github.com/' + repo + '/blob/' + ( repos [ repo ] . branch || 'master' ) )
76- }
77- }
78- }
68+ let repo = `javascript-tutorial/${ config . lang } .javascript.info` ;
69+
70+ config . tutorialRepo = {
71+ github : repo ,
72+ url : new URL ( 'https://github.com/' + repo ) ,
73+ tree : new URL ( 'https://github.com/' + repo + '/tree/master' ) ,
74+ blob : new URL ( 'https://github.com/' + repo + '/blob/master' )
75+ } ;
76+
7977
8078require . extensions [ '.yml' ] = function ( module , filename ) {
8179 module . exports = yaml . safeLoad ( fs . readFileSync ( filename , 'utf-8' ) ) ;
You can’t perform that action at this time.
0 commit comments