vTaiwan架站指南

編輯歷史

時間 作者 版本
2015-03-10 07:46 – 08:22 Audrey Tang r777 – r872
顯示 diff
(53 行未修改)
* "parent_category_name": "問題討論:新經濟"
* }
-
+ patch pg 以支援中文全文檢索
+ 在discourse機器上,進入app內
+ *su postgres
+ *psql
+ *update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');
+ 再回到外層,launcher rebuild app 即可。(pull request 已送回上游)
- patch onebox gem 以支援FB貼文
+ patch onebox gem 以支援 FB、PTT 貼文
在discourse機器上,進入app內
(3 行未修改)
- gem 'onebox'
+ *gem 'onebox'
修改為
- gem 'onebox', 'git' -> 'https://github.com/billy3321/onebox.git'
+ *gem 'onebox', git: 'https://github.com/billy3321/onebox.git'
在/var/www/discourse內執行
- bundle update onebox --no-deployment
+ *bundle install --no-deployment
+ *bundle update onebox
修改 /var/www/discourse/config/unicorn_launcher
(1 行未修改)
在檔案上方加入:
- export FACEBOOK_APP_ID=""
- export FACEBOOK_APP_SECRET=""
+ *export FACEBOOK_APP_ID=""
+ *export FACEBOOK_APP_SECRET=""
最後,重開機器即可!
2015-03-10 06:27 – 06:31 雨蒼 林 r608 – r776
顯示 diff
(59 行未修改)
+ patch onebox gem 以支援FB貼文
- g/
+ 在discourse機器上,進入app內
+
+ 修改 /var/www/discourse/Gemfile
+
+ 把
+
+ gem 'onebox'
+
+ 修改為
+
+ gem 'onebox', 'git' -> 'https://github.com/billy3321/onebox.git'
+
+ 在/var/www/discourse內執行
+
+ bundle update onebox --no-deployment
+
+ 修改 /var/www/discourse/config/unicorn_launcher
+
+ 在檔案上方加入:
+
+ export FACEBOOK_APP_ID=""
+ export FACEBOOK_APP_SECRET=""
+
+ 最後,重開機器即可!
2015-03-10 06:27 (unknown) r607
顯示 diff
(63 行未修改)
2015-03-10 06:27 – 06:27 雨蒼 林 r604 – r606
顯示 diff
(53 行未修改)
* "parent_category_name": "問題討論:新經濟"
* }
+
+
+
+
+
+
+
+ g/
2015-03-03 10:19 – 10:20 Audrey Tang r535 – r603
顯示 diff
(18 行未修改)
*首頁按「新分類」,安全設定如下:
*
+ *新分類的預設文章作者,如果要改成系統用戶,可以按右上方的扳手按鈕,按「選取要移動的文章」、「選取全部」、「變更擁有者」即可。
+
基本設定裡,將子分類設為固定順序:
*
(31 行未修改)
2015-03-03 07:51 – 09:19 Audrey Tang r276 – r534
顯示 diff
(13 行未修改)
*Edge Expire: 2hr (or 1hr for pro)
*Browser Cache: 30min
-
- 在管理員->API->產生金鑰
+ *在管理員->API->產生金鑰
+ *開一個總帳號(如 sdparty),授予板主、管理員、信任等級四
+ *首頁按「新分類」,安全設定如下:
+ *
+ 基本設定裡,將子分類設為固定順序:
+ *
+ 取得分類的 ID:
+ *
B機器:
靜態網站機器,以angular串起gitbook及discourse
https://github.com/g0v/vtaiwan.tw
+
+ 小字典:
+ 在 Google Spreadsheet 裡,複製 vTaiwan 小字典(File -> Make a Copy -> Move to Drive),將頁籤名稱改成與討論議題同名,再按 Publish:
+
+ *
GitBook 建置(本機端):
- 在 .bashrc 裡加上
- *export API_KEY=(discourse API key)
+ 在 package.json 裡,spreadsheet ID 從 published sheet 處取得,再加上頁籤序號到「republish:lexicon」即可。
- 在 book.json
+ *sudo npm i -g gitbook
+ *npm i
+ *npm run republish:lexicon
+ *gitbook install
+ *env API_KEY="discourse API key" gitbook build
+ *npm run republish:lexicon
+
+ 在 book.json 裡,parent_category_id 由上述「分類 ID」取得:
+ * "discourse": {
+ * "url": "https://talk.sdparty.tw/",
+ * "api_key": "",
+ * "api_username": "sdparty",
+ * "parent_category_id": 5,
+ * "parent_category_name": "問題討論:新經濟"
+ * }
2015-03-03 07:40 – 07:40 雨蒼 林 r267 – r275
顯示 diff
(24 行未修改)
在 .bashrc 裡加上
- *export API_KEY=(
+ *export API_KEY=(discourse API key)
在 book.json
2015-03-03 07:40 Audrey Tang r266
顯示 diff
(26 行未修改)
*export API_KEY=(
- 在 book.json
+ 在 book.json
2015-03-03 07:40 – 07:40 雨蒼 林 r264 – r265
顯示 diff
(24 行未修改)
在 .bashrc 裡加上
- *export API_KEY=((()
+ *export API_KEY=(
在 book.json
2015-03-03 07:40 – 07:40 Audrey Tang r262 – r263
顯示 diff
(26 行未修改)
*export API_KEY=((()
- 在 bo
+ 在 book.json
2015-03-03 07:40 雨蒼 林 r261
顯示 diff
(24 行未修改)
在 .bashrc 裡加上
- *export API_KEY=(((
+ *export API_KEY=((()
在 bo
2015-03-03 07:40 Audrey Tang r260
顯示 diff
(26 行未修改)
*export API_KEY=(((
- 在
+ 在 bo
2015-03-03 07:40 雨蒼 林 r259
顯示 diff
(24 行未修改)
在 .bashrc 裡加上
- *export API_KEY=(
+ *export API_KEY=(((
2015-03-03 07:40 Audrey Tang r258
顯示 diff
(26 行未修改)
*export API_KEY=(
- 在
+ 在
2015-03-03 07:40 雨蒼 林 r257
顯示 diff
(24 行未修改)
在 .bashrc 裡加上
- *export API_KEY=
+ *export API_KEY=(
2015-03-03 07:40 (unknown) r256
顯示 diff
(29 行未修改)
2015-03-03 07:40 Audrey Tang r255
顯示 diff
(25 行未修改)
在 .bashrc 裡加上
*export API_KEY=
+
+ 在
2015-03-03 07:40 雨蒼 林 r254
顯示 diff
(24 行未修改)
在 .bashrc 裡加上
- *export API_KEY=xyzxyxyz
+ *export API_KEY=
2015-03-03 07:40 – 07:40 Audrey Tang r236 – r253
顯示 diff
(15 行未修改)
在管理員->API->產生金鑰
-
- 在 .bashrc 裡加上
- *export API_KEY=xyzxyxyz
-
(1 行未修改)
靜態網站機器,以angular串起gitbook及discourse
https://github.com/g0v/vtaiwan.tw
+
+ GitBook 建置(本機端):
+
+ 在 .bashrc 裡加上
+ *export API_KEY=xyzxyxyz
2015-03-03 07:40 雨蒼 林 r235
顯示 diff
(18 行未修改)
在 .bashrc 裡加上
*export API_KEY=xyzxyxyz
-
(4 行未修改)
2015-03-03 07:39 – 07:40 Audrey Tang r213 – r234
顯示 diff
(15 行未修改)
在管理員->API->產生金鑰
- 把API KEY貼入 gitbook
+
+ 在 .bashrc 裡加上
+ *export API_KEY=xyzxyxyz
+
(4 行未修改)
2015-03-03 07:39 – 07:39 雨蒼 林 r187 – r212
顯示 diff
(13 行未修改)
*Edge Expire: 2hr (or 1hr for pro)
*Browser Cache: 30min
+
+ 在管理員->API->產生金鑰
+ 把API KEY貼入 gitbook
+
+
B機器:
(2 行未修改)
2015-03-03 07:22 – 07:28 Audrey Tang r160 – r186
顯示 diff
(1 行未修改)
A機器:
- Gitbook,靜態網站機器
- https://github.com/g0v/crowdfunding-gitbook
- https://github.com/g0v/closelyheld-gitbook
- lexicon.json中設定好spreadsheet的來源與相應的key
-
-
- B機器:
https://github.com/discourse/discourse_docker
discourse,以docker安裝discourse,預設就有提供json API
+ *containers/app.yml
+ DISCOURSE_ENABLE_CORS: true
+ DISCOURSE_CORS_ORIGIN: '*'
+ CloudFlare Rules:
+ *https://talk.vtaiwan.tw/t/topic/*.json
+ *https://talk.vtaiwan.tw/c/*.json
+ *Custom Cache: On
+ *Edge Expire: 2hr (or 1hr for pro)
+ *Browser Cache: 30min
- C機器:
+ B機器:
靜態網站機器,以angular串起gitbook及discourse
https://github.com/g0v/vtaiwan.tw
2015-03-03 07:21 – 07:22 雨蒼 林 r130 – r159
顯示 diff
(10 行未修改)
https://github.com/discourse/discourse_docker
discourse,以docker安裝discourse,預設就有提供json API
+
C機器:
(2 行未修改)
2015-01-20 10:09 – 10:28 雨蒼 林 r1 – r129
顯示 diff
- Untitled
+ vTaiwan架站指南
- This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!
+ A機器:
+ Gitbook,靜態網站機器
+ https://github.com/g0v/crowdfunding-gitbook
+ https://github.com/g0v/closelyheld-gitbook
+ lexicon.json中設定好spreadsheet的來源與相應的key
+
+
+ B機器:
+ https://github.com/discourse/discourse_docker
+ discourse,以docker安裝discourse,預設就有提供json API
+
+ C機器:
+ 靜態網站機器,以angular串起gitbook及discourse
+ https://github.com/g0v/vtaiwan.tw
2015-01-20 10:09 (unknown) r0
顯示 diff
+ Untitled
+ This pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!