diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2016-12-29 15:12:34 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2016-12-29 15:12:34 +0900 |
| commit | 8579bc45f2c2f52e01596510a12c85af7a220218 (patch) | |
| tree | 8214b75a58e4fbd972d53caad89f6854c689efd3 | |
| parent | Refactor: Rename pug --> about:docs (diff) | |
| download | misskey-8579bc45f2c2f52e01596510a12c85af7a220218.tar.gz misskey-8579bc45f2c2f52e01596510a12c85af7a220218.tar.bz2 misskey-8579bc45f2c2f52e01596510a12c85af7a220218.zip | |
Docs: Implement License page
| -rw-r--r-- | gulpfile.ts | 5 | ||||
| -rw-r--r-- | src/web/about/pages/license.pug | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gulpfile.ts b/gulpfile.ts index f56f6b1d27..5a6bfc6cfe 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -2,6 +2,7 @@ * Gulp tasks */ +import * as fs from 'fs'; import * as path from 'path'; import * as gulp from 'gulp'; import * as gutil from 'gulp-util'; @@ -63,13 +64,15 @@ gulp.task('build:ts', () => ); gulp.task('build:about:docs', () => { + const licenseHtml = fs.readFileSync('./LICENSE', 'utf-8').replace(/\r\n|\n/g, '<br>'); const pugs = glob.sync('./src/web/about/pages/**/*.pug'); const streams = pugs.map(file => { const page = file.replace('./src/web/about/pages/', '').replace('.pug', ''); return gulp.src(file) .pipe(pug({ locals: Object.assign({ - path: page + path: page, + license: licenseHtml }, config) })) .pipe(gulp.dest('./built/web/about/pages/' + path.parse(page).dir)); diff --git a/src/web/about/pages/license.pug b/src/web/about/pages/license.pug index 1c4f5e8bc6..eb008a3caf 100644 --- a/src/web/about/pages/license.pug +++ b/src/web/about/pages/license.pug @@ -5,3 +5,5 @@ block title block content h1 ライセンス + + div!= license |