feat: add markdown update history
Publish GitHub Pages output / publish (push) Successful in 40s

This commit is contained in:
2026-08-31 14:17:49 +09:00
parent c01a3e534b
commit b48a3b4f9d
7 changed files with 155 additions and 12 deletions
@@ -0,0 +1,15 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { parseUpdateHistoryDocument } from '../update-history-document.ts';
test('업데이트 Markdown의 최근 업데이트 시각을 본문과 분리한다', () => {
const document = parseUpdateHistoryDocument('---\nupdatedAt: 2026-08-31T14:15:17+09:00\n---\n\n## 업데이트');
assert.equal(document.updatedAt, '2026-08-31T14:15:17+09:00');
assert.equal(document.body, '\n## 업데이트');
});
test('메타데이터가 없는 Markdown도 그대로 표시한다', () => {
const markdown = '## 업데이트';
assert.deepEqual(parseUpdateHistoryDocument(markdown), { updatedAt: null, body: markdown });
});