this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add discoverable frontmatter field for remanso notes

Adds support for the `discoverable` boolean field on `space.remanso.note`
records. Defaults to true when not set or invalid; can be set to false
via frontmatter to hide a note from discovery feeds.

+15 -1
+8
packages/cli/src/lib/markdown.ts
··· 109 109 frontmatter.draft = draftValue === true || draftValue === "true"; 110 110 } 111 111 112 + // Discoverable mapping (defaults to true if not set or invalid) 113 + const discoverableValue = raw.discoverable; 114 + if (discoverableValue === false || discoverableValue === "false") { 115 + frontmatter.discoverable = false; 116 + } else { 117 + frontmatter.discoverable = true; 118 + } 119 + 112 120 // Always preserve atUri (internal field) 113 121 frontmatter.atUri = raw.atUri; 114 122
+1
packages/cli/src/lib/types.ts
··· 96 96 ogImage?: string; 97 97 atUri?: string; 98 98 draft?: boolean; 99 + discoverable?: boolean; 99 100 } 100 101 101 102 export interface BlogPost {
+4 -1
packages/remanso/src/commands/sync.ts
··· 60 60 rkey, 61 61 }); 62 62 const noteValue = noteResponse.data.value as Record<string, unknown>; 63 + const localDiscoverable = localPost.frontmatter.discoverable ?? true; 64 + const noteDiscoverable = (noteValue.discoverable as boolean | undefined) ?? true; 63 65 if ( 64 66 (localPost.frontmatter.theme || undefined) !== 65 67 (noteValue.theme as string | undefined) || 66 68 (localPost.frontmatter.fontSize || undefined) !== 67 69 (noteValue.fontSize as number | undefined) || 68 70 (localPost.frontmatter.fontFamily || undefined) !== 69 - (noteValue.fontFamily as string | undefined) 71 + (noteValue.fontFamily as string | undefined) || 72 + localDiscoverable !== noteDiscoverable 70 73 ) { 71 74 return false; 72 75 }
+2
packages/remanso/src/lib/note.ts
··· 226 226 record.fontFamily = post.frontmatter.fontFamily; 227 227 } 228 228 229 + record.discoverable = post.frontmatter.discoverable ?? true; 230 + 229 231 return record; 230 232 } 231 233