File tree Expand file tree Collapse file tree 5 files changed +30
-3
lines changed Expand file tree Collapse file tree 5 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 1
1
const remark = require ( 'remark' ) ;
2
2
const lint = require ( 'remark-preset-lint-recommended' ) ;
3
3
const html = require ( 'remark-html' ) ;
4
+ const highlight = require ( 'remark-highlight.js' ) ;
5
+ const slug = require ( 'remark-slug' ) ;
6
+ const github = require ( 'remark-github' ) ;
7
+ const headings = require ( 'remark-autolink-headings' ) ;
8
+ const squeezeParagraphs = require ( 'remark-squeeze-paragraphs' ) ;
9
+ const remarkPing = require ( 'remark-ping' ) ;
4
10
const report = require ( 'vfile-reporter' ) ;
5
11
6
12
function processMarkdown ( contents ) {
7
13
return new Promise ( ( resolve , reject ) => {
8
14
remark ( )
9
15
. use ( lint )
16
+ . use ( slug )
17
+ // todo: figure out why this isn't creating any anchors
18
+ // .use(headings, {
19
+ // behaviour: 'wrap',
20
+ // })
21
+ . use ( highlight )
22
+ . use ( squeezeParagraphs )
23
+ . use ( github , {
24
+ repository : 'rigor789/nativescript-vue'
25
+ } )
26
+ . use ( remarkPing , {
27
+ pingUsername : ( ) => true ,
28
+ userURL : ( user ) => `https://github.com/${ user } `
29
+ } )
10
30
. use ( html )
11
31
. process ( contents , ( err , file ) => {
12
32
if ( err ) reject ( err ) ;
13
-
33
+ // console.log(file.toString());
14
34
resolve ( file ) ;
15
35
} )
16
36
} )
Original file line number Diff line number Diff line change 2
2
<meta name =" viewport"
3
3
content =" width=device-width, initial-scale=1.0" >
4
4
<meta http-equiv =" X-UA-Compatible" content =" ie=edge" >
5
+ <
link rel =
" stylesheet" href =
" https://unpkg.com/[email protected] /styles/paraiso-dark.css" >
5
6
<
link rel =
" stylesheet" href =
" https://unpkg.com/[email protected] /github-markdown.css" >
6
7
<link rel =" stylesheet" href =" /styles.css" >
Original file line number Diff line number Diff line change 35
35
"multimatch" : " ^2.1.0" ,
36
36
"permalinks" : " ^1.2.1" ,
37
37
"remark" : " ^8.0.0" ,
38
+ "remark-autolink-headings" : " ^5.0.0" ,
39
+ "remark-github" : " ^7.0.2" ,
40
+ "remark-highlight.js" : " ^5.0.0" ,
38
41
"remark-html" : " ^7.0.0" ,
42
+ "remark-ping" : " ^1.0.8" ,
39
43
"remark-preset-lint-recommended" : " ^3.0.1" ,
44
+ "remark-slug" : " ^5.0.0" ,
45
+ "remark-squeeze-paragraphs" : " ^3.0.1" ,
40
46
"table-of-contents-json" : " ^1.2.0" ,
41
47
"tailwindcss" : " ^0.4.0" ,
42
48
"vfile-reporter" : " ^4.0.0"
Original file line number Diff line number Diff line change 30
30
31
31
.markdown-body {
32
32
@apply .mt-8 ;
33
- }
33
+ }
Original file line number Diff line number Diff line change @@ -13480,4 +13480,4 @@ button,
13480
13480
.xl\:bg-docs-gradient {
13481
13481
background : linear-gradient (90deg , # f1f5f8 50% , # fff 50% );
13482
13482
}
13483
- }
13483
+ }
You can’t perform that action at this time.
0 commit comments