tangled
alpha
login
or
join now
apoena.dev
/
sequoia
forked from
stevedylan.dev/sequoia
0
fork
atom
A CLI for publishing standard.site documents to ATProto
0
fork
atom
overview
issues
pulls
pipelines
feat: add theme and fonts
Julien Calixte
1 month ago
02b4dd27
d664f63c
0/1
lint.yml
failed
4s
+23
3 changed files
expand all
collapse all
unified
split
packages
cli
src
extensions
litenote.ts
lib
markdown.ts
types.ts
+15
packages/cli/src/extensions/litenote.ts
···
242
242
record.images = images
243
243
}
244
244
245
245
+
if (post.frontmatter.theme) {
246
246
+
record.theme = post.frontmatter.theme
247
247
+
}
248
248
+
249
249
+
if (post.frontmatter.fontSize) {
250
250
+
record.fontSize = post.frontmatter.fontSize
251
251
+
}
252
252
+
253
253
+
console.log("front matter | ", title, post.frontmatter);
254
254
+
255
255
+
256
256
+
if (post.frontmatter.fontFamily) {
257
257
+
record.fontFamily = post.frontmatter.fontFamily
258
258
+
}
259
259
+
245
260
await agent.com.atproto.repo.putRecord({
246
261
repo: agent.did!,
247
262
collection: LEXICON,
+5
packages/cli/src/lib/markdown.ts
···
162
162
const coverField = mapping?.coverImage || "ogImage";
163
163
frontmatter.ogImage = raw[coverField] || raw.ogImage;
164
164
165
165
+
// Theme, font family and font size
166
166
+
frontmatter.theme = raw.theme;
167
167
+
frontmatter.fontFamily = raw.fontFamily;
168
168
+
frontmatter.fontSize = raw.fontSize;
169
169
+
165
170
// Tags mapping
166
171
const tagsField = mapping?.tags || "tags";
167
172
frontmatter.tags = raw[tagsField] || raw.tags;
+3
packages/cli/src/lib/types.ts
···
85
85
86
86
export interface PostFrontmatter {
87
87
title: string;
88
88
+
theme?: string
89
89
+
fontFamily?: string
90
90
+
fontSize?: number
88
91
description?: string;
89
92
publishDate: string;
90
93
tags?: string[];