美文网首页
一招解决hexo博客出现无法加载“hexo-prism-plug

一招解决hexo博客出现无法加载“hexo-prism-plug

作者: KangSmit的算法那些事儿 | 来源:发表于2020-04-07 03:55 被阅读0次

    原文详细教程

    一、问题的描述

    “ERROR Plugin load failed: hexo-prism-plugin”

    $ hexo s
    ERROR Plugin load failed: hexo-prism-plugin
    Error: `prism_plugin` options should be added to _config.yml file
        at E:\hexo\node_modules\hexo-prism-plugin\src\index.js:70:9
        at E:\hexo\node_modules\hexo\lib\hexo\index.js:293:14
        at tryCatcher (E:\hexo\node_modules\bluebird\js\release\util.js:16:23)
        at Promise._settlePromiseFromHandler (E:\hexo\node_modules\bluebird\js\release\promise.js:547:31)
        at Promise._settlePromise (E:\hexo\node_modules\bluebird\js\release\promise.js:604:18)
        at Promise._settlePromise0 (E:\hexo\node_modules\bluebird\js\release\promise.js:649:10)
        at Promise._settlePromises (E:\hexo\node_modules\bluebird\js\release\promise.js:729:18)
        at Promise._fulfill (E:\hexo\node_modules\bluebird\js\release\promise.js:673:18)
        at Promise._resolveCallback (E:\hexo\node_modules\bluebird\js\release\promise.js:466:57)
        at Promise._settlePromiseFromHandler (E:\hexo\node_modules\bluebird\js\release\promise.js:559:17)
        at Promise._settlePromise (E:\hexo\node_modules\bluebird\js\release\promise.js:604:18)
        at Promise._settlePromise0 (E:\hexo\node_modules\bluebird\js\release\promise.js:649:10)
        at Promise._settlePromises (E:\hexo\node_modules\bluebird\js\release\promise.js:729:18)
        at Promise._fulfill (E:\hexo\node_modules\bluebird\js\release\promise.js:673:18)
        at E:\hexo\node_modules\bluebird\js\release\nodeback.js:42:21
        at E:\hexo\node_modules\graceful-fs\graceful-fs.js:115:16
        at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
    INFO  Start processing
    INFO  Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
    INFO  See you again
    
    
    
    

    二、问题的解决

    在博客目录下的配置文件中打开,将以下代码放在最后即可,重新启动生成部署。

    prism_plugin:
      mode: 'preprocess' # realtime/preprocess
      theme: 'default'
      line_number: false # default false
    

    相关文章

      网友评论

          本文标题:一招解决hexo博客出现无法加载“hexo-prism-plug

          本文链接:https://www.haomeiwen.com/subject/ymbwphtx.html