File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 75
75
var postObj = new Map ( ) ;
76
76
postObj . set ( "title" , { { . Title } } ) ;
77
77
postObj . set ( "link" , { { . RelPermalink } } ) ;
78
+ postObj . set ( "wordCount" , { { . WordCount } } ) ;
78
79
var wordCount = { { . WordCount } } ;
79
80
var data = postsByDate . get ( date ) ;
80
81
if ( data === undefined ) {
168
169
enterable : true ,
169
170
formatter : function ( params ) {
170
171
const thousandWordsText = { { default "EN" ( . Get "language" ) } } === "EN" ? 'k words' : '千字' ;
171
- const thousandWords = ( params . data [ 1 ] / 1000.0 ) . toFixed ( 1 ) ;
172
172
const date = params . data [ 0 ] ;
173
173
const posts = postsByDate . get ( date ) . get ( "posts" ) ;
174
174
var content = `${ date } ` ;
175
175
for ( const [ i , post ] of posts . entries ( ) ) {
176
176
content += "<br>" ;
177
177
var link = post . get ( "link" ) ;
178
178
var title = post . get ( "title" ) ;
179
+ const thousandWords = ( post . get ( "wordCount" ) / 1000.0 ) . toFixed ( 1 ) ;
179
180
content += `<a href="${ link } " target="_blank">${ title } | ${ thousandWords } ${ thousandWordsText } </a>`
180
181
}
181
182
return content ;
You can’t perform that action at this time.
0 commit comments