mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-23 00:29:22 +09:00
Docs: Implement License page
This commit is contained in:
parent
94948583d2
commit
8579bc45f2
@ -2,6 +2,7 @@
|
|||||||
* Gulp tasks
|
* Gulp tasks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as gulp from 'gulp';
|
import * as gulp from 'gulp';
|
||||||
import * as gutil from 'gulp-util';
|
import * as gutil from 'gulp-util';
|
||||||
@ -63,13 +64,15 @@ gulp.task('build:ts', () =>
|
|||||||
);
|
);
|
||||||
|
|
||||||
gulp.task('build:about:docs', () => {
|
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 pugs = glob.sync('./src/web/about/pages/**/*.pug');
|
||||||
const streams = pugs.map(file => {
|
const streams = pugs.map(file => {
|
||||||
const page = file.replace('./src/web/about/pages/', '').replace('.pug', '');
|
const page = file.replace('./src/web/about/pages/', '').replace('.pug', '');
|
||||||
return gulp.src(file)
|
return gulp.src(file)
|
||||||
.pipe(pug({
|
.pipe(pug({
|
||||||
locals: Object.assign({
|
locals: Object.assign({
|
||||||
path: page
|
path: page,
|
||||||
|
license: licenseHtml
|
||||||
}, config)
|
}, config)
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest('./built/web/about/pages/' + path.parse(page).dir));
|
.pipe(gulp.dest('./built/web/about/pages/' + path.parse(page).dir));
|
||||||
|
@ -5,3 +5,5 @@ block title
|
|||||||
|
|
||||||
block content
|
block content
|
||||||
h1 ライセンス
|
h1 ライセンス
|
||||||
|
|
||||||
|
div!= license
|
||||||
|
Loading…
Reference in New Issue
Block a user