HEXO启动,初始化,本地页面成功启动,(Win 7 64 bit)可以在浏览器打开http://localhost:4000
使用這個hexo,首先起碼得在本地跑通,估計mac的教程 都很專業,都可以很輕松的就跑起來啦。但是,對于Windows用戶來說,就沒那么輕松了,當然,人要是機智呢,多花點時間也是可以搞定的。就比如我。嘿嘿。
下面是我當時操作的記錄。
首先是,我在自己電腦上安裝好了hexo,而且經檢測,確認這個hexo已經安裝OK啦。下面就是我在本地怎么讓這個hexo跑起來。
先看第一個錯誤的示范。
具體原因,我已經在配圖上寫明了。
至于這個會產生大概130行的文字吧,我是不嫌棄麻煩的給貼到下面吧。諸位看官們,就多轉幾下鼠標滑輪而已啦。
從執行hexo init 命令開始產生的文字。如下。
D:\hexo>hexo init INFO Cloning hexo-starter to D:\hexo Cloning into 'D:\hexo'... remote: Counting objects: 53, done. remote: Total 53 (delta 0), reused 0 (delta 0), pack-reused 53 Unpacking objects: 100% (53/53), done. Submodule 'themes/landscape' (https://github.com/hexojs/hexo-theme-landscape.git ) registered for path 'themes/landscape' Cloning into 'D:/hexo/themes/landscape'... remote: Counting objects: 781, done. remote: Compressing objects: 100% (6/6), done. remote: Total 781 (delta 0), reused 1 (delta 0), pack-reused 775 Receiving objects: 100% (781/781), 2.54 MiB | 202.00 KiB/s, done. Resolving deltas: 100% (397/397), done. Submodule path 'themes/landscape': checked out 'decdc2d9956776cbe95420ae94bac87e 22468d38' INFO Install dependencies ��?: ���?��??�?��?��?� npm WARN deprecated swig@1.4.2: This package is no longer maintained> hexo-util@0.6.0 postinstall D:\hexo\node_modules\hexo-renderer-marked\node_mod ules\hexo-util > npm run build:highlight| > hexo-util@0.6.0 build:highlight D:\hexo\node_modules\hexo-renderer-marked\node _modules\hexo-util > node scripts/build_highlight_alias.js > highlight_alias.jsonnpm WARN optional dep failed, continuing fsevents@1.1.1 npm WARN optional dep failed, continuing fsevents@1.1.1 npm WARN optional dep failed, continuing fsevents@1.1.1> hexo-util@0.6.0 postinstall D:\hexo\node_modules\hexo\node_modules\hexo-util > npm run build:highlight| > hexo-util@0.6.0 build:highlight D:\hexo\node_modules\hexo\node_modules\hexo-ut il > node scripts/build_highlight_alias.js > highlight_alias.json> dtrace-provider@0.8.2 install D:\hexo\node_modules\hexo\node_modules\hexo-log\ node_modules\bunyan\node_modules\dtrace-provider > node scripts/install.jshexo-generator-index@0.2.1 node_modules\hexo-generator-index ├── object-assign@4.1.1 └── hexo-pagination@0.0.2 (utils-merge@1.0.0)hexo-generator-tag@0.2.0 node_modules\hexo-generator-tag ├── object-assign@4.1.1 └── hexo-pagination@0.0.2 (utils-merge@1.0.0)hexo-generator-category@0.1.3 node_modules\hexo-generator-category ├── object-assign@2.1.1 └── hexo-pagination@0.0.2 (utils-merge@1.0.0)hexo-generator-archive@0.1.4 node_modules\hexo-generator-archive ├── object-assign@2.1.1 └── hexo-pagination@0.0.2 (utils-merge@1.0.0)hexo-renderer-ejs@0.2.0 node_modules\hexo-renderer-ejs ├── object-assign@4.1.1 └── ejs@1.0.0hexo-renderer-marked@0.2.11 node_modules\hexo-renderer-marked ├── object-assign@4.1.1 ├── marked@0.3.6 ├── strip-indent@1.0.1 (get-stdin@4.0.1) └── hexo-util@0.6.0 (html-entities@1.2.1, striptags@2.2.1, bluebird@3.5.0, hi ghlight.js@9.12.0, camel-case@3.0.0, cross-spawn@4.0.2)hexo-server@0.2.1 node_modules\hexo-server ├── object-assign@4.1.1 ├── mime@1.3.6 ├── bluebird@3.5.0 ├── chalk@1.1.3 (supports-color@2.0.0, escape-string-regexp@1.0.5, ansi-style s@2.2.1, strip-ansi@3.0.1, has-ansi@2.0.0) ├── opn@4.0.2 (pinkie-promise@2.0.1) ├── morgan@1.8.2 (basic-auth@1.1.0, on-headers@1.0.1, depd@1.1.0, debug@2.6.8 , on-finished@2.3.0) ├── connect@3.6.2 (utils-merge@1.0.0, parseurl@1.3.1, debug@2.6.7, finalhandl er@1.0.3) ├── serve-static@1.12.3 (escape-html@1.0.3, encodeurl@1.0.1, parseurl@1.3.1, send@0.15.3) └── compression@1.6.2 (bytes@2.3.0, vary@1.1.1, on-headers@1.0.1, debug@2.2.0 , compressible@2.0.10, accepts@1.3.3)hexo-renderer-stylus@0.3.3 node_modules\hexo-renderer-stylus ├── nib@1.1.2 └── stylus@0.54.5 (css-parse@1.7.0, sax@0.5.8, debug@2.6.8, source-map@0.1.43 , mkdirp@0.5.1, glob@7.0.6)hexo@3.3.7 node_modules\hexo ├── abbrev@1.1.0 ├── pretty-hrtime@1.0.3 ├── hexo-front-matter@0.2.3 ├── archy@1.0.0 ├── titlecase@1.1.2 ├── text-table@0.2.0 ├── strip-indent@1.0.1 (get-stdin@4.0.1) ├── deep-assign@2.0.0 (is-obj@1.0.1) ├── tildify@1.2.0 (os-homedir@1.0.2) ├── minimatch@3.0.4 (brace-expansion@1.1.7) ├── bluebird@3.5.0 ├── moment-timezone@0.5.13 ├── chalk@1.1.3 (escape-string-regexp@1.0.5, supports-color@2.0.0, ansi-style s@2.2.1, has-ansi@2.0.0, strip-ansi@3.0.1) ├── hexo-i18n@0.2.1 (sprintf-js@1.1.1) ├── swig-extras@0.0.1 (markdown@0.5.0) ├── swig@1.4.2 (optimist@0.6.1, uglify-js@2.4.24) ├── js-yaml@3.8.4 (esprima@3.1.3, argparse@1.0.9) ├── hexo-fs@0.1.6 (escape-string-regexp@1.0.5, graceful-fs@4.1.11, chokidar@1 .7.0) ├── hexo-cli@1.0.3 (object-assign@4.1.1, command-exists@1.2.2, minimist@1.2.0 , hexo-fs@0.2.0) ├── nunjucks@2.5.2 (asap@2.0.5, chokidar@1.7.0, yargs@3.32.0) ├── moment@2.13.0 ├── hexo-util@0.6.0 (html-entities@1.2.1, striptags@2.2.1, cross-spawn@4.0.2,camel-case@3.0.0, highlight.js@9.12.0) ├── lodash@4.17.4 ├── warehouse@2.2.0 (graceful-fs@4.1.11, is-plain-object@2.0.3, JSONStream@1. 3.1, cuid@1.3.8) ├── hexo-log@0.1.3 (bunyan@1.8.10) └── cheerio@0.20.0 (entities@1.1.1, dom-serializer@0.1.0, css-select@1.2.0, h tmlparser2@3.8.3, jsdom@7.2.2) INFO Start blogging with Hexo!D:\hexo>在這之后,繼續幾步,就可以看到頁面啦。咱繼續看圖。
可以看到,圖上又執行了幾個命令,然后頁面就跑起來啦。
這個時候,就可以在瀏覽器瀏覽上圖圈圈里面的地址啦。
具體應該是醬紫的
這個是沒有換主題的。
下面是我剛剛新建在d盤的那個空文件夾hexo在執行操作之后的變化。
可以看到這個theme文件夾下面是這個靜態頁面的主題啦。可以自己找個主題給他替換一下。
就比如我又替換了個。看下圖效果。
簡單說下具體,怎么替換:
可以看到這個theme文件下現在是有2個主題的。
剛剛安裝完成的時候,使用都是默認的那個landscape。我替換成hexo-theme-yilia這個就是上面看到的另一個截圖的效果啦。
暫時就先這么多吧。
還有把這個東西放到github上,綁定自己買的域名,換個更花哨的,哦,不是,是更漂亮的主題,添加評論系統,統計系統,啥的,以后空了再說吧。
等下,要是我下次啟動的時候,怎么辦呢?
哦,繼續看圖吧。我也是小錯誤了一把。
直接使用hexo命令是不行的,還是得到對應的安裝目錄去運行。具體看上面,直接運行,就可以啟動了。不用再安裝啥的了。
我暫時是這么個結論。
總結
以上是生活随笔為你收集整理的HEXO启动,初始化,本地页面成功启动,(Win 7 64 bit)可以在浏览器打开http://localhost:4000的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 分层强化学习综述:Hierarchica
- 下一篇: 前端工程筹建NodeJs+gulp+bo