-
Notifications
You must be signed in to change notification settings - Fork 7
/
readme.js
50 lines (49 loc) · 1.43 KB
/
readme.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* eslint-disable no-undef */
const showdown = require('showdown');
const fs = require('fs');
const data = fs.readFileSync('README.md');
const converter = new showdown.Converter();
const html = converter.makeHtml(data.toString());
const htmlBody = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./demo/assets/vendor.css">
<link rel="stylesheet" href="./demo/assets/semantic.min.css">
<link rel="stylesheet" href="./assets/app.css">
<title>Ember Semantic Ui</title>
<style>
</style>
</head>
<body>
<div class="m-nav">
<div class="wrap">
<a class="home" href="/ember-semantic-ui/">
ember-semantic-ui
</a>
<ul class="nav external">
<li>
<a href="https://github.com/wecatch/ember-semantic-uid">Github</a>
</li>
<li>
<a href="https://wecatch.me">Wecatch</a>
</li>
</ul>
<ul class="nav internal">
<li><a href="/ember-semantic-ui/docs/">Docs</a></li>
<li><a href="/ember-semantic-ui/demo/">Demo</a></li>
</ul>
</div>
</div>
<div class="container" >
${html}
</div>
<script src="./assets/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
</body>
</html>
`;
fs.writeFileSync('index.html', htmlBody);