mnaoumov_obsidian-backlink-.../demo-vault/_assets/CodeScriptToolkit/demoSetup.ts
Michael Naumov 3e27a6af52 feat: add demo vault
Ship a curated demo-vault/ for Backlink Full Path, bootstrapped by the
release-injected obsidian-dev-utils demo-vault-helper. Three same-named Meeting
notes in different folders link to a shared note so the Backlinks pane shows each
one's full path; a Settings note documents every option. Add a static
registerDemoVaultCoverageSuite no-app test, the project dprint.json (excludes
demo-vault), and the README demo vault access section.
2026-07-20 02:23:55 -06:00

16 lines
737 B
TypeScript

import type { App } from 'obsidian';
import { Notice } from 'obsidian';
import {
enableCommunityPlugin,
installCommunityPlugin
} from 'obsidian-dev-utils/obsidian/community-plugins';
// Backlink Full Path changes how the core Backlinks pane renders each source note's path, so there is
// Nothing for a code-button to drive - you just open a note and look at its backlinks. The only helper the
// Vault needs is the shared CodeScript Toolkit installer used by the prerequisite note's button.
export async function installAndEnable(app: App, pluginId: string): Promise<void> {
await installCommunityPlugin({ app, pluginId });
await enableCommunityPlugin({ app, pluginId });
new Notice(`Installed and enabled: ${pluginId}`);
}