feat: bookmarklet to blog stuff easily

This commit is contained in:
2026-02-22 17:49:11 +01:00
parent 6e45936fc9
commit 509afa4c85
17 changed files with 613 additions and 5 deletions

View File

@@ -729,6 +729,30 @@ describe('MetaEngine', () => {
expect(metadata?.maxPostsPerPage).toBe(42);
});
it('should set and get blogmarkCategory in project metadata', async () => {
await metaEngine.setProjectMetadata({
name: 'My Blog',
blogmarkCategory: 'Article',
} as any);
const metadata = await metaEngine.getProjectMetadata();
expect((metadata as any)?.blogmarkCategory).toBe('article');
});
it('should persist blogmarkCategory to filesystem', async () => {
await metaEngine.setProjectMetadata({
name: 'Test Project',
blogmarkCategory: 'links',
} as any);
const metaDir = metaEngine.getMetaDir();
const projectPath = normalizePath(`${metaDir}/project.json`);
const content = mockFiles.get(projectPath);
const parsed = JSON.parse(content!);
expect(parsed.blogmarkCategory).toBe('links');
});
it('should set and get publicUrl in project metadata', async () => {
await metaEngine.setProjectMetadata({
name: 'My Blog',