Various AT Protocol integrations with obsidian
20
fork

Configure Feed

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

use at uri for published wikilink

+9 -6
+8 -5
src/lib/markdown/wikilinks.ts
··· 25 25 ): string { 26 26 return markdown.replace( 27 27 WIKILINK_RE, 28 - (_match, noteName: string, heading: string | undefined, alias: string | undefined) => { 28 + (_match, noteName: string, _heading: string | undefined, alias: string | undefined) => { 29 29 const displayText = (alias ?? noteName).trim(); 30 30 const name = noteName.trim(); 31 31 ··· 41 41 if (!fm?.atDocument || !fm?.url) { 42 42 return displayText; 43 43 } 44 - baseUrl = fm.url as string; 45 - } 46 44 45 + baseUrl = fm.atDocument as string; // for AT uri mention in facets 46 + } 47 47 // if (!baseUrl && gardenBaseUrl) { 48 48 // const base = gardenBaseUrl.replace(/\/$/, ""); 49 49 // baseUrl = `${base}/notes/${titleToSlug(name)}`; ··· 53 53 return displayText; 54 54 } 55 55 56 - const url = heading ? `${baseUrl}#${titleToSlug(heading)}` : baseUrl; 57 - return `[${displayText}](${url})`; 56 + // TODO: can't add heading when using AT uri 57 + // make configurable to use url (support heading) vs at uri 58 + 59 + // const url = heading ? `${baseUrl}#${titleToSlug(heading)}` : baseUrl; 60 + return `[${displayText}](${baseUrl})`; 58 61 } 59 62 ); 60 63 }
+1 -1
src/postprocessor.ts
··· 1 1 import { Component, MarkdownPostProcessorContext, setIcon } from "obsidian"; 2 - import { BSKY_POST_RE, bskyPostATUri } from "lib"; 2 + import { BSKY_POST_RE, bskyPostATUri } from "./util"; 3 3 4 4 5 5 export class BlueskyPostProcessor extends Component {