tangled
alpha
login
or
join now
stevedylan.dev
/
sequoia
35
fork
atom
A CLI for publishing standard.site documents to ATProto
sequoia.pub
standard
site
lexicon
cli
publishing
35
fork
atom
overview
issues
5
pulls
1
pipelines
chore: lint and format
stevedylan.dev
1 month ago
006b5faa
fe16c5f9
1/1
lint.yml
success
7s
+27
-11
5 changed files
expand all
collapse all
unified
split
packages
cli
src
commands
publish.ts
sync.ts
components
sequoia-comments.js
lib
atproto.ts
markdown.ts
+5
-1
packages/cli/src/commands/publish.ts
···
241
241
242
242
let postUrl = "";
243
243
if (verbose) {
244
244
-
const postPath = resolvePostPath(post, config.pathPrefix, config.pathTemplate);
244
244
+
const postPath = resolvePostPath(
245
245
+
post,
246
246
+
config.pathPrefix,
247
247
+
config.pathTemplate,
248
248
+
);
245
249
postUrl = `\n ${config.siteUrl}${postPath}`;
246
250
}
247
251
log.message(
+5
-1
packages/cli/src/commands/sync.ts
···
151
151
// Document path is like /posts/my-post-slug (or custom pathPrefix/pathTemplate)
152
152
const postsByPath = new Map<string, (typeof localPosts)[0]>();
153
153
for (const post of localPosts) {
154
154
-
const postPath = resolvePostPath(post, config.pathPrefix, config.pathTemplate);
154
154
+
const postPath = resolvePostPath(
155
155
+
post,
156
156
+
config.pathPrefix,
157
157
+
config.pathTemplate,
158
158
+
);
155
159
postsByPath.set(postPath, post);
156
160
}
157
161
+1
-2
packages/cli/src/components/sequoia-comments.js
···
588
588
this.commentsContainer = container;
589
589
this.state = { type: "loading" };
590
590
this.abortController = null;
591
591
-
592
591
}
593
592
594
593
static get observedAttributes() {
···
701
700
</div>
702
701
`;
703
702
if (this.hide) {
704
704
-
this.commentsContainer.style.display = 'none';
703
703
+
this.commentsContainer.style.display = "none";
705
704
}
706
705
break;
707
706
+10
-2
packages/cli/src/lib/atproto.ts
···
245
245
config: PublisherConfig,
246
246
coverImage?: BlobObject,
247
247
): Promise<string> {
248
248
-
const postPath = resolvePostPath(post, config.pathPrefix, config.pathTemplate);
248
248
+
const postPath = resolvePostPath(
249
249
+
post,
250
250
+
config.pathPrefix,
251
251
+
config.pathTemplate,
252
252
+
);
249
253
const publishDate = new Date(post.frontmatter.publishDate);
250
254
251
255
// Determine textContent: use configured field from frontmatter, or fallback to markdown body
···
306
310
307
311
const [, , collection, rkey] = uriMatch;
308
312
309
309
-
const postPath = resolvePostPath(post, config.pathPrefix, config.pathTemplate);
313
313
+
const postPath = resolvePostPath(
314
314
+
post,
315
315
+
config.pathPrefix,
316
316
+
config.pathTemplate,
317
317
+
);
310
318
const publishDate = new Date(post.frontmatter.publishDate);
311
319
312
320
// Determine textContent: use configured field from frontmatter, or fallback to markdown body
+6
-5
packages/cli/src/lib/markdown.ts
···
231
231
return slug;
232
232
}
233
233
234
234
-
export function resolvePathTemplate(
235
235
-
template: string,
236
236
-
post: BlogPost,
237
237
-
): string {
234
234
+
export function resolvePathTemplate(template: string, post: BlogPost): string {
238
235
const publishDate = new Date(post.frontmatter.publishDate);
239
236
const year = String(publishDate.getFullYear());
240
237
const month = String(publishDate.getMonth() + 1).padStart(2, "0");
···
270
267
return result;
271
268
}
272
269
273
273
-
export function resolvePostPath(post: BlogPost, pathPrefix?: string, pathTemplate?: string): string {
270
270
+
export function resolvePostPath(
271
271
+
post: BlogPost,
272
272
+
pathPrefix?: string,
273
273
+
pathTemplate?: string,
274
274
+
): string {
274
275
if (pathTemplate) {
275
276
return resolvePathTemplate(pathTemplate, post);
276
277
}