summaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2016-12-29 15:04:22 +0900
committersyuilo <syuilotan@yahoo.co.jp>2016-12-29 15:04:22 +0900
commit7fcbbed901a487a7cb79a74b34ddc920623526d3 (patch)
treedabd914cee96a6041d5d7952026c45aeaa50a465 /src/web
parentAdd index page (diff)
downloadsharkey-7fcbbed901a487a7cb79a74b34ddc920623526d3.tar.gz
sharkey-7fcbbed901a487a7cb79a74b34ddc920623526d3.tar.bz2
sharkey-7fcbbed901a487a7cb79a74b34ddc920623526d3.zip
aboutのドキュメント(pug)を予めコンパイルしておくように
Diffstat (limited to 'src/web')
-rw-r--r--src/web/about/base.pug2
-rw-r--r--src/web/about/pages/api/getting-started.pug6
-rw-r--r--src/web/about/pages/license.pug2
-rw-r--r--src/web/server.ts11
4 files changed, 6 insertions, 15 deletions
diff --git a/src/web/about/base.pug b/src/web/about/base.pug
index a026c03f28..81d9497d18 100644
--- a/src/web/about/base.pug
+++ b/src/web/about/base.pug
@@ -5,7 +5,7 @@ html(lang='ja', dir='ltr')
head
meta(charset='utf-8')
meta(name='application-name', content='Misskey')
- meta(name='theme-color', content='#f76d6c')
+ meta(name='theme-color', content=themeColor)
meta(name='referrer', content='origin')
meta(name='viewport', content='width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no')
link(rel='stylesheet', href='/resources/style.css')
diff --git a/src/web/about/pages/api/getting-started.pug b/src/web/about/pages/api/getting-started.pug
index 974964e3eb..61c9a9305f 100644
--- a/src/web/about/pages/api/getting-started.pug
+++ b/src/web/about/pages/api/getting-started.pug
@@ -29,7 +29,7 @@ block content
h3 アプリケーションを作成する
p まずはあなたのアプリケーションを作成しましょう。
p
- | <a href=#{config.dev_url} target="_blank">デベロッパーセンター</a>にアクセスし、アプリ > アプリ作成 に進みます。
+ | <a href=#{dev_url} target="_blank">デベロッパーセンター</a>にアクセスし、アプリ > アプリ作成 に進みます。
br
| 次に、フォームに必要事項を記入します:
dl
@@ -55,7 +55,7 @@ block content
section
h3 ユーザーに認証させる
p あなたのアプリを使ってもらうには、ユーザーにアカウントへアクセスすることを許可してもらい、Misskeyにそのユーザーのアクセストークンを発行してもらう必要があります。
- p 認証セッションを開始するには、<code>#{config.api_url}/auth/session/generate</code>へパラメータに<code>app_secret</code>としてApp Secretを含めたリクエストを送信します。
+ p 認証セッションを開始するには、<code>#{api_url}/auth/session/generate</code>へパラメータに<code>app_secret</code>としてApp Secretを含めたリクエストを送信します。
p
| そうすると、レスポンスとして認証セッションのトークンや認証フォームのURLが取得できます。
br
@@ -67,7 +67,7 @@ block content
h4 あなたのアプリがコールバックURLを設定していない場合
p ユーザーがアプリの連携を許可したことを(何らかの方法で(たとえばボタンを押させるなど))確認出来るようにしてください。
p
- | 次に、<code>#{config.api_url}/auth/session/userkey</code>へ<code>app_secret</code>としてApp Secretを、<code>token</code>としてセッションのトークンをパラメータとして付与したリクエストを送信してください。
+ | 次に、<code>#{api_url}/auth/session/userkey</code>へ<code>app_secret</code>としてApp Secretを、<code>token</code>としてセッションのトークンをパラメータとして付与したリクエストを送信してください。
br
| 上手くいけば、認証したユーザーのアクセストークンがレスポンスとして取得できます。おめでとうございます!
diff --git a/src/web/about/pages/license.pug b/src/web/about/pages/license.pug
index 7adda0bff4..1c4f5e8bc6 100644
--- a/src/web/about/pages/license.pug
+++ b/src/web/about/pages/license.pug
@@ -5,5 +5,3 @@ block title
block content
h1 ライセンス
-
- include ../../../../LICENSE
diff --git a/src/web/server.ts b/src/web/server.ts
index 8e6f00cf3c..31c00bc4af 100644
--- a/src/web/server.ts
+++ b/src/web/server.ts
@@ -17,7 +17,6 @@ import serveApp from './serve-app';
*/
const app = express();
app.disable('x-powered-by');
-app.set('view engine', 'pug');
app.use(bodyParser.urlencoded({ extended: true }));
app.use(compression());
@@ -64,17 +63,11 @@ app.use('/@/about/resources', express.static(`${__dirname}/about/resources`, {
}));
app.get('/@/about/', (req, res) => {
- res.render(`${__dirname}/about/pages/index`, {
- path: 'index',
- config: config
- });
+ res.sendFile(`${__dirname}/about/pages/index.html`);
});
app.get('/@/about/:page(*)', (req, res) => {
- res.render(`${__dirname}/about/pages/${req.params.page}`, {
- path: req.params.page,
- config: config
- });
+ res.sendFile(`${__dirname}/about/pages/${req.params.page}.html`);
});
app.get('/@/auth/*', serveApp('auth')); // authorize form