This commit is contained in:
syuilo
2017-12-17 01:41:22 +09:00
parent b563a67b8a
commit 0769566408
24 changed files with 65 additions and 42 deletions

View File

@@ -0,0 +1,3 @@
h1 About Misskey
p Misskey is a mini blog SNS.

View File

@@ -0,0 +1,3 @@
h1 Misskeyについて
p MisskeyはミニブログSNSです。

View File

@@ -2,7 +2,7 @@ extends ../../layout.pug
include ../mixins
block meta
link(rel="stylesheet" href="/assets/docs/api/endpoints/style.css")
link(rel="stylesheet" href="/assets/api/endpoints/style.css")
block main
h1= endpoint

View File

@@ -2,7 +2,7 @@ extends ../../layout.pug
include ../mixins
block meta
link(rel="stylesheet" href="/assets/docs/api/entities/style.css")
link(rel="stylesheet" href="/assets/api/entities/style.css")
block main
h1= name

View File

@@ -14,13 +14,13 @@ mixin propTable(props)
if prop.kind == 'id'
if prop.entity
| (
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
a(href=`/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
| ID)
else
| (ID)
else if prop.kind == 'entity'
| (
a(href=`/docs/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
a(href=`/${lang}/api/entities/${kebab(prop.entity)}`)= prop.entity
| )
else if prop.kind == 'object'
if prop.def

View File

@@ -70,5 +70,5 @@ gulp.task('doc:styles', () =>
gulp.src('./src/web/docs/**/*.styl')
.pipe(stylus())
.pipe((cssnano as any)())
.pipe(gulp.dest('./built/web/assets/docs/'))
.pipe(gulp.dest('./built/web/docs/assets/'))
);

View File

@@ -6,9 +6,9 @@ html(lang= lang)
meta(name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no")
title
| #{title} | Misskey Docs
link(rel="stylesheet" href="/assets/docs/style.css")
link(rel="stylesheet" href="/assets/style.css")
block meta
base(href=`/docs/${lang}/`)
base(href=`/${lang}/`)
body
nav

21
src/web/docs/server.ts Normal file
View File

@@ -0,0 +1,21 @@
/**
* Docs Server
*/
import * as express from 'express';
/**
* Init app
*/
const app = express();
app.disable('x-powered-by');
app.use('/assets', express.static(`${__dirname}/assets`));
/**
* Routing
*/
app.get(/^\/([a-z_\-\/]+?)$/, (req, res) =>
res.sendFile(`${__dirname}/${req.params[0]}.html`));
module.exports = app;

3
src/web/docs/tou.ja.pug Normal file
View File

@@ -0,0 +1,3 @@
h1 利用規約
p 公序良俗に反する行為はおやめください。

View File

@@ -1,4 +0,0 @@
利用規約
================================================================
公序良俗に反する行為はおやめください。