Add customize highlight.theme custom path support (#517)

* add themeUrl option to support custom theme file path

* Update api-site-config.md
This commit is contained in:
huang.xinghui 2018-04-19 23:04:49 +08:00 committed by Joel Marcey
parent 40a9047620
commit aa32ff4a55
3 changed files with 12 additions and 15 deletions

View file

@ -33,12 +33,6 @@ class Site extends React.Component {
(this.props.url || 'index.html');
let docsVersion = this.props.version || 'current';
const highlightDefaultVersion = '9.12.0';
const highlightConfig = this.props.config.highlight || {
version: highlightDefaultVersion,
theme: 'default',
};
const highlightVersion = highlightConfig.version || highlightDefaultVersion;
if (fs.existsSync(CWD + '/versions.json')) {
const latestVersion = require(CWD + '/versions.json')[0];
if (docsVersion === latestVersion) {