OpenShift + Ghost
編輯頁面
/ghost/editor/
如何 local 開啟 openfhift clone 來的 ghost:
- 由於用 openshift 創的 blog 是走 MySQL 或者 PostgreSQL,下載下來後預設是 SQLite,因此要做些設定。
npm install sqlite3
\content
底下建立資料夾data
=><path>\content\data
node index
從 openshift 下載的 ghost,
npm index.js
一直執行失敗。Unhandled rejection Error: Cannot find module 'd:\openshift\BLOG\ghost\blog\node_modules\sqlite3\lib\binding\node-v47-win32-x64\node_sqlite3.node' at Function.Module._resolveFilename (module.js:339:15) at Function.Module._load (module.js:290:25) at Module.require (module.js:367:17) at require (internal/module.js:20:19) at Object.<anonymous> (d:\openshift\BLOG\ghost\blog\node_modules\sqlite3\lib\sqlite3.js:4:15) at Module._compile (module.js:413:34) at Object.Module._extensions..js (module.js:422:10) at Module.load (module.js:357:32) at Function.Module._load (module.js:314:12) at Module.require (module.js:367:17) at require (internal/module.js:20:19) at Client_SQLite3.initDriver (d:\openshift\BLOG\ghost\blog\node_modules\ghost\node_modules\knex\lib\dialects\sqlite3\index.js:41:24) at new Client_SQLite3 (d:\openshift\BLOG\ghost\blog\node_modules\ghost\node_modules\knex\lib\dialects\sqlite3\index.js:15:10) at Knex.initialize (d:\openshift\BLOG\ghost\blog\node_modules\ghost\node_modules\knex\knex.js:109:15) at Knex (d:\openshift\BLOG\ghost\blog\node_modules\ghost\node_modules\knex\knex.js:13:26) at ConfigManager.set (d:\openshift\BLOG\ghost\blog\node_modules\ghost\core\server\config\index.js:156:24) at ConfigManager.init (d:\openshift\BLOG\ghost\blog\node_modules\ghost\core\server\config\index.js:79:10) at d:\openshift\BLOG\ghost\blog\node_modules\ghost\core\server\config\index.js:273:30 at tryCatcher (d:\openshift\BLOG\ghost\blog\node_modules\ghost\node_modules\bluebird\js\main\util.js:26:23) at Promise._settlePromiseFromHandler (d:\openshift\BLOG\ghost\blog\node_modules\ghost\node_modules\bluebird\js\main\promise.js:507:31) at Promise._settlePromiseAt (d:\openshift\BLOG\ghost\blog\node_modules\ghost\node_modules\bluebird\js\main\promise.js:581:18) at Promise._settlePromises (d:\openshift\BLOG\ghost\blog\node_modules\ghost\node_modules\bluebird\js\main\promise.js:697:14)
原來是要先把
\node_modules\ghost\node_modules\sqlite3\
資料夾刪除,再npm install sqlite3
,就成功了。 (原來路徑不同 install 存的位置在 \node_modules\sqlite3 底下)在
git push
的時候記得不要把自己創的東西推到 openshift 上。
- 由於用 openshift 創的 blog 是走 MySQL 或者 PostgreSQL,下載下來後預設是 SQLite,因此要做些設定。
安裝 DISQUS