|
|
@ -26,7 +26,24 @@ async function generateEpub() {
|
|
|
|
output: 'cronicas-periodisticas.epub',
|
|
|
|
output: 'cronicas-periodisticas.epub',
|
|
|
|
content: [],
|
|
|
|
content: [],
|
|
|
|
appendChapterTitles: true,
|
|
|
|
appendChapterTitles: true,
|
|
|
|
verbose: true
|
|
|
|
verbose: true,
|
|
|
|
|
|
|
|
fetchImages: false, // Disable image downloading
|
|
|
|
|
|
|
|
customHtmlTocTemplate: ({ title, author, chapters }) => `
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
|
|
|
<title>${title}</title>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<h1>${title}</h1>
|
|
|
|
|
|
|
|
<p>Por ${author}</p>
|
|
|
|
|
|
|
|
<p><em>Nota: Las imágenes no se incluyeron en este eBook. Visite los enlaces originales para ver el contenido completo.</em></p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
${chapters.map(chapter => `<li><a href="${chapter.url}">${chapter.title}</a></li>`).join('')}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
`
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Convert each post to ePub chapter format
|
|
|
|
// Convert each post to ePub chapter format
|
|
|
|