调整 gh-pages 流程

This commit is contained in:
2betop 2020-08-21 12:20:05 +08:00
parent 0e7050d952
commit ce4f4df752
3 changed files with 3 additions and 2 deletions

View File

@ -35,5 +35,5 @@ glob('./docs/**/*.md', {}, function (er, docs) {
path: doc.replace('.md', '')
});
}
fs.writeFileSync('./gh-pages/docs/docs.json', JSON.stringify(resultData));
fs.writeFileSync('./examples/docs.json', JSON.stringify(resultData));
});

View File

@ -17,7 +17,7 @@ export default class DocSearch extends React.Component {
this.onSearchCancel = this.onSearchCancel.bind(this);
}
componentDidMount() {
Axios.get('/docs/docs.json')
Axios.get(__uri('../docs.json'))
.then(result => {
this.docs = result.data.docs;
})

1
examples/docs.json Normal file
View File

@ -0,0 +1 @@
{}