File tree 1 file changed +15
-15
lines changed
1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -53,23 +53,23 @@ async function run(argv) {
53
53
54
54
await createImages ( postData ) ;
55
55
56
- const rows = chunk ( postData , 5 ) . map (
57
- chunk =>
58
- "| " +
59
- chunk
60
- . map (
61
- postData =>
62
- `<a href='${ postData . folder } '><img src='${
63
- postData . folder
64
- } /cover.jpg' width='140px;' /></a><h4 align='center'><a href='${
65
- postData . folder
66
- } '>${ postData . title } </a><h4>`
67
- )
68
- . join ( " | " ) +
69
- " |"
56
+ const items = postData . map (
57
+ postData =>
58
+ `<a href='${ postData . folder } '><img src='${
59
+ postData . folder
60
+ } /cover.jpg' width='140px;' /></a><h4 align='center'><a href='${
61
+ postData . folder
62
+ } '>${ postData . title } </a><h4>`
70
63
) ;
64
+
65
+ const rows = chunk ( items , 5 ) . map ( chunk => `| ` + chunk . join ( " | " ) + ` |` ) ;
66
+
71
67
let output =
72
- rows . join ( "\n" ) + "\n" + "| :---: | :---: | :---: | :---: | :---: |" ;
68
+ rows [ 0 ] +
69
+ "\n" +
70
+ "| :---: | :---: | :---: | :---: | :---: |\n" +
71
+ rows . slice ( 1 ) . join ( "\n" ) ;
72
+
73
73
console . log ( output ) ;
74
74
}
75
75
You can’t perform that action at this time.
0 commit comments