fix: simpler structure in the template

This commit is contained in:
2026-02-20 22:02:41 +01:00
parent b6446b797f
commit 1543af6edc
7 changed files with 301 additions and 279 deletions

View File

@@ -184,6 +184,7 @@ describe('BlogGenerationEngine', () => {
expect(await fileExists(path.join(tempDir, 'html', 'assets', 'pico.min.css'))).toBe(true);
expect(await fileExists(path.join(tempDir, 'html', 'assets', 'lightbox.min.css'))).toBe(true);
expect(await fileExists(path.join(tempDir, 'html', 'assets', 'lightbox.min.js'))).toBe(true);
expect(await fileExists(path.join(tempDir, 'html', 'assets', 'tag-cloud.js'))).toBe(true);
expect(await fileExists(path.join(tempDir, 'html', 'images', 'prev.png'))).toBe(true);
expect(await fileExists(path.join(tempDir, 'html', 'images', 'next.png'))).toBe(true);
expect(await fileExists(path.join(tempDir, 'html', 'images', 'close.png'))).toBe(true);
@@ -209,6 +210,8 @@ describe('BlogGenerationEngine', () => {
expect(html).toContain('data-template="post-list"');
expect(html).toContain('/assets/pico.min.css');
expect(html).toContain('/assets/lightbox.min.css');
expect(html).toContain('/assets/tag-cloud.js');
expect(html).not.toContain('function parseWords(');
expect(html).toContain('archive-day-marker');
expect(html).toContain('15.01.2025');
expect(html).toContain('14.01.2025');

View File

@@ -178,6 +178,8 @@ describe('PreviewServer', () => {
expect(rootHtml).toContain('href="/assets/lightbox.min.css"');
expect(rootHtml).toContain('src="/assets/lightbox.min.js"');
expect(rootHtml).toContain('src="/assets/d3.layout.cloud.js"');
expect(rootHtml).toContain('src="/assets/tag-cloud.js"');
expect(rootHtml).not.toContain('function parseWords(');
expect(rootHtml).not.toContain('cdn.jsdelivr.net');
const picoResponse = await fetch(`${server.getBaseUrl()}/assets/pico.min.css`);
@@ -196,6 +198,10 @@ describe('PreviewServer', () => {
expect(d3CloudJsResponse.status).toBe(200);
expect(d3CloudJsResponse.headers.get('content-type')).toContain('application/javascript');
const tagCloudJsResponse = await fetch(`${server.getBaseUrl()}/assets/tag-cloud.js`);
expect(tagCloudJsResponse.status).toBe(200);
expect(tagCloudJsResponse.headers.get('content-type')).toContain('application/javascript');
const lightboxPrevImageResponse = await fetch(`${server.getBaseUrl()}/images/prev.png`);
expect(lightboxPrevImageResponse.status).toBe(200);
expect(lightboxPrevImageResponse.headers.get('content-type')).toContain('image/png');