@@ -33,7 +33,6 @@ const saveSrc = require('./plugins/save-src');
3333const  anchors  =  require ( './plugins/anchors' ) ; 
3434
3535// configuration 
36- const  versionsConfig  =  require ( './config/versions' ) ; 
3736const  msDefaultOpts  =  require ( './config/metalsmith' ) ; 
3837const  sdkVersions  =  JSON . stringify ( ymlRead . sync ( path . join ( __dirname ,  './test/sdk-versions.yml' ) ) ) . replace ( / \s + / g,  '' ) ; 
3938
@@ -76,27 +75,15 @@ const redirectList = {
7675  //If you need others, add it here 
7776} ; 
7877
79- for  ( const  version  of  versionsConfig )  { 
80-   if  ( version . version_path  ===  options . build . path )  { 
81-     log ( `Using version ${ color . bold ( version . version_label ) }  ) ; 
82- 
83-     options . github . repository  =  version . version_gh_repo ; 
84-     options . github . branch  =  version . version_gh_branch ; 
85-     options . algolia . index  =  version . algolia_index ; 
86-   } 
87- } 
88- 
8978options . algolia . fnFileParser  =  ( file ,  data )  =>  { 
9079  const  objects  =  [ ] ; 
9180  const  $  =  cheerio . load ( data . contents . toString ( ) ,  { 
9281    normalizeWhitespace : true 
9382  } ) ; 
94-   const  content  =  $ ( '.main -content' ) ; 
83+   const  content  =  $ ( '.md -content' ) ; 
9584
9685  // remove useless content 
97-   $ ( '.hljs' ,  content ) . remove ( ) ; 
98-   $ ( 'blockquote' ,  content ) . remove ( ) ; 
99-   $ ( '.language-tab-selector' ,  content ) . remove ( ) ; 
86+   $ ( 'pre' ,  content ) . remove ( ) ; 
10087  $ ( 'h1, h2, h3, h4, h5, h6' ,  content ) . remove ( ) ; 
10188
10289  objects . push ( { 
@@ -109,7 +96,7 @@ options.algolia.fnFileParser = (file, data) => {
10996    firstMember : ( data . ancestry . firstMember  ? data . ancestry . firstMember . title  : '' ) , 
11097    toc : data . toc 
11198  } ) ; 
112- 
99+    
113100  return  objects ; 
114101} ; 
115102
@@ -126,7 +113,6 @@ const metalsmith = _metalsmith(__dirname)
126113    algolia_projectId : options . algolia . projectId , 
127114    algolia_publicKey : options . algolia . publicKey , 
128115    algolia_index : options . algolia . index , 
129-     versions_config : versionsConfig , 
130116    is_dev : options . dev . enabled , 
131117    sdkVersions : sdkVersions , 
132118    exclude : options . exclude 
0 commit comments