@@ -2,7 +2,7 @@ import fs from 'fs';
22import path from 'path' ;
33import fm from "front-matter" ;
44import yaml from 'js-yaml' ;
5- import { chunkContent , getLinesPerPage , getCharsPerLine , PaginationConfig } from './utils/markdown-chunker' ;
5+ import { chunkContent , getCharsPerPage , PaginationConfig } from './utils/markdown-chunker' ;
66import { loadTheme } from './utils/theme-loader' ;
77
88const publicDir = path . join ( __dirname , '..' , 'public' ) ;
@@ -22,14 +22,12 @@ const themeScale = theme?.font?.scale ?? 1;
2222// Build pagination config
2323const paginationConfig : PaginationConfig = {
2424 columns : config ?. reader ?. columns ?? 2 ,
25- linesPerPage : config ?. reader ?. linesPerPage ,
2625 pagination : config ?. reader ?. pagination ,
2726} ;
2827
29- const LINES_PER_PAGE = getLinesPerPage ( paginationConfig , themeScale ) ;
30- const CHARS_PER_LINE = getCharsPerLine ( paginationConfig , themeScale ) ;
28+ const CHARS_PER_PAGE = getCharsPerPage ( paginationConfig , themeScale ) ;
3129
32- console . log ( `[pagination]: theme=${ themeName } , scale=${ themeScale } , linesPerPage =${ LINES_PER_PAGE } , charsPerLine= ${ CHARS_PER_LINE } ` ) ;
30+ console . log ( `[pagination]: theme=${ themeName } , scale=${ themeScale } , charsPerPage =${ CHARS_PER_PAGE } ` ) ;
3331
3432type PiecePage = {
3533 pieceSlug : string ;
@@ -63,7 +61,7 @@ piecesIndex.forEach((piece: any) => {
6361 const parsed = fm ( raw ) ;
6462 const content = parsed . body ;
6563
66- const chunks = chunkContent ( content , LINES_PER_PAGE , CHARS_PER_LINE ) ;
64+ const chunks = chunkContent ( content , CHARS_PER_PAGE ) ;
6765 const totalPages = chunks . length ;
6866
6967 const pages : PiecePage [ ] = chunks . map ( ( chunk , index ) => ( {
0 commit comments