diff --git a/src/core/index.js b/src/core/index.js index 6e6164186..43db1eb15 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -4,5 +4,14 @@ import { Docsify } from './Docsify'; /** * Run Docsify */ -// eslint-disable-next-line no-unused-vars -documentReady(_ => new Docsify()); +const runDocsify = () => { + // eslint-disable-next-line no-unused-vars + documentReady(_ => new Docsify()); +}; + +if (window.DOCSIFY_DEFER) { + window.runDocsify = runDocsify; +} else { + window.runDocsify = () => {}; + runDocsify(); +}