From a63fe7ffb9d9f8b73f5e55c78d322bdf51d6976d Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sat, 14 Feb 2026 01:06:34 +0100 Subject: [PATCH] feat: add theme and fonts --- packages/cli/src/extensions/litenote.ts | 12 ++++++++++++ packages/cli/src/lib/markdown.ts | 5 +++++ packages/cli/src/lib/types.ts | 3 +++ 3 files changed, 20 insertions(+) diff --git a/packages/cli/src/extensions/litenote.ts b/packages/cli/src/extensions/litenote.ts index 0e39447..9c835f0 100644 --- a/packages/cli/src/extensions/litenote.ts +++ b/packages/cli/src/extensions/litenote.ts @@ -242,6 +242,18 @@ export async function updateNote( record.images = images } + if (post.frontmatter.theme) { + record.theme = post.frontmatter.theme + } + + if (post.frontmatter.fontSize) { + record.fontSize = post.frontmatter.fontSize + } + + if (post.frontmatter.fontFamily) { + record.fontFamily = post.frontmatter.fontFamily + } + await agent.com.atproto.repo.putRecord({ repo: agent.did!, collection: LEXICON, diff --git a/packages/cli/src/lib/markdown.ts b/packages/cli/src/lib/markdown.ts index db3261e..a3e07cc 100644 --- a/packages/cli/src/lib/markdown.ts +++ b/packages/cli/src/lib/markdown.ts @@ -162,6 +162,11 @@ export function parseFrontmatter( const coverField = mapping?.coverImage || "ogImage"; frontmatter.ogImage = raw[coverField] || raw.ogImage; + // Theme, font family and font size + frontmatter.theme = raw.theme; + frontmatter.fontFamily = raw.fontFamily; + frontmatter.fontSize = raw.fontSize; + // Tags mapping const tagsField = mapping?.tags || "tags"; frontmatter.tags = raw[tagsField] || raw.tags; diff --git a/packages/cli/src/lib/types.ts b/packages/cli/src/lib/types.ts index 0381ea4..d58cf63 100644 --- a/packages/cli/src/lib/types.ts +++ b/packages/cli/src/lib/types.ts @@ -86,6 +86,9 @@ export function isAppPasswordCredentials( export interface PostFrontmatter { title: string; + theme?: string + fontFamily?: string + fontSize?: number description?: string; publishDate: string; tags?: string[]; -- 2.51.2