mirror of
https://github.com/mnaoumov/obsidian-backlink-full-path.git
synced 2026-07-22 12:10:28 +00:00
Compare commits
No commits in common. "main" and "1.6.8" have entirely different histories.
29 changed files with 347 additions and 471 deletions
|
|
@ -1 +0,0 @@
|
|||
# AGENTS.md
|
||||
21
CHANGELOG.md
21
CHANGELOG.md
|
|
@ -1,26 +1,5 @@
|
|||
# CHANGELOG
|
||||
|
||||
## 1.6.11
|
||||
|
||||
- chore: update libs
|
||||
|
||||
## 1.6.10
|
||||
|
||||
- chore: update libs
|
||||
- chore(demo-vault): drop committed Invocables placeholder
|
||||
- fix(demo-vault): export invoke() from startup script; add Invocables folder
|
||||
|
||||
## 1.6.9
|
||||
|
||||
- docs: standardize demo-vault README
|
||||
- docs: drop per-plugin demo-vault setup notes (bootstrap covered by ODU harness)
|
||||
- docs: unnumber demo-vault setup notes
|
||||
- Merge branch 'T107-renumber': number Backlink Full Path demo vault example notes (S2)
|
||||
- Merge branch 'T107': create the Backlink Full Path demo vault (S2)
|
||||
- chore: update libs
|
||||
- docs: update
|
||||
- docs: migrate to AGENTS.md
|
||||
|
||||
## 1.6.8
|
||||
|
||||
- chore: update libs
|
||||
|
|
|
|||
5
CLAUDE.md
Normal file
5
CLAUDE.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# CLAUDE.md
|
||||
|
||||
## Known Issues
|
||||
|
||||
None.
|
||||
10
README.md
10
README.md
|
|
@ -17,14 +17,6 @@ This plugin shows the full name helping to identify the backlinks better
|
|||
|
||||

|
||||
|
||||
## Demo vault
|
||||
|
||||
A demo vault with usage examples ships with every release. You can access it via any of the following:
|
||||
|
||||
1. Running the **Backlink Full Path: Open demo vault** command.
|
||||
2. Downloading `backlink-full-path.demo-vault.zip` from the [Releases](https://github.com/mnaoumov/obsidian-backlink-full-path/releases).
|
||||
3. Browsing its source in [`demo-vault/`](./demo-vault/README.md) in this repository.
|
||||
|
||||
## Installation
|
||||
|
||||
The plugin is available in [the official Community Plugins repository](https://obsidian.md/plugins?id=backlink-full-path).
|
||||
|
|
@ -47,7 +39,7 @@ To show them, run the following command:
|
|||
window.DEBUG.enable('backlink-full-path');
|
||||
```
|
||||
|
||||
For more details, refer to the [documentation](https://mnaoumov.dev/obsidian-dev-utils/guides/debugging/).
|
||||
For more details, refer to the [documentation](https://github.com/mnaoumov/obsidian-dev-utils/blob/main/docs/debugging.md).
|
||||
|
||||
## Support
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@
|
|||
"dictionaryDefinitions": [],
|
||||
"dictionaries": [],
|
||||
"words": [
|
||||
"Invocables",
|
||||
"unnumber",
|
||||
"backlink",
|
||||
"backlinks",
|
||||
"dblclick",
|
||||
|
|
|
|||
13
demo-vault/.gitignore
vendored
13
demo-vault/.gitignore
vendored
|
|
@ -1,13 +0,0 @@
|
|||
# Churny / runtime-generated Obsidian state.
|
||||
.obsidian/workspace.json
|
||||
.obsidian/hotkeys.json
|
||||
|
||||
# Built plugins are release-injected by archivePluginDemoVault at release time —
|
||||
# both the plugin under test AND the obsidian-dev-utils-owned Demo Vault Helper
|
||||
# bootstrap plugin (which installs, configures, and enables CodeScript Toolkit at
|
||||
# runtime). Nothing helper-related is committed; commit only the baked settings
|
||||
# file for the plugin under test.
|
||||
.obsidian/plugins/*
|
||||
!.obsidian/plugins/backlink-full-path/
|
||||
.obsidian/plugins/backlink-full-path/*
|
||||
!.obsidian/plugins/backlink-full-path/data.json
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
// Scoped markdownlint config for the demo vault. The notes are an Obsidian
|
||||
// vault, so two default rules are inherently incompatible and disabled here;
|
||||
// every other rule still applies so the notes stay clean.
|
||||
"config": {
|
||||
// Notes intentionally open with a `[Docs](...)` link, not a heading.
|
||||
"MD041": false,
|
||||
// `[[wikilinks]]` are Obsidian's native link syntax; markdownlint parses
|
||||
// them as undefined shortcut reference links.
|
||||
"MD052": false
|
||||
}
|
||||
}
|
||||
8
demo-vault/.obsidian/app.json
vendored
8
demo-vault/.obsidian/app.json
vendored
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"attachmentFolderPath": "_assets/attachments",
|
||||
"newLinkFormat": "shortest",
|
||||
"useMarkdownLinks": false,
|
||||
"showUnsupportedFiles": true,
|
||||
"defaultViewMode": "source",
|
||||
"livePreview": true
|
||||
}
|
||||
4
demo-vault/.obsidian/community-plugins.json
vendored
4
demo-vault/.obsidian/community-plugins.json
vendored
|
|
@ -1,4 +0,0 @@
|
|||
[
|
||||
"demo-vault-helper",
|
||||
"backlink-full-path"
|
||||
]
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
Welcome to the [Backlink Full Path](https://github.com/mnaoumov/obsidian-backlink-full-path/) demo vault. Obsidian's core **Backlinks** pane shows only each linking note's file name - so several notes that share a name (three different `Meeting` notes, say) look identical. **Backlink Full Path** adds each note's folder path to that pane so you can tell them apart, with plenty of options for how the path is shown.
|
||||
|
||||
**How to see it:** open [[Shared topic]], then open the **Backlinks** pane (the link icon in the right sidebar, or the "Backlinks" view). Three notes all named `Meeting` link here - with the plugin enabled, each backlink shows its full folder path.
|
||||
|
||||
## Feature
|
||||
|
||||
- [[01 Backlink full path]]
|
||||
- [[02 Settings]]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
[Docs](https://github.com/mnaoumov/obsidian-backlink-full-path/)
|
||||
|
||||
# Backlink full path
|
||||
|
||||
Open [[Shared topic]] and look at its **Backlinks** pane. Three different notes link to it, and all three are named `Meeting`:
|
||||
|
||||
- [[Projects/Alpha/Meeting]]
|
||||
- [[Projects/Beta/Meeting]]
|
||||
- [[Notes/Meeting]]
|
||||
|
||||
Without this plugin, the Backlinks pane lists three identical `Meeting` entries. With it enabled, each one shows its folder path (`Projects/Alpha`, `Projects/Beta`, `Notes`) so you know which is which.
|
||||
|
||||
## Try it
|
||||
|
||||
1. Open [[Shared topic]].
|
||||
2. Open the **Backlinks** pane (right sidebar link icon, or the command **Backlinks: Show backlinks**).
|
||||
3. Notice each backlink now carries its full path.
|
||||
4. Head to [[02 Settings]] and tweak how the path is rendered - depth, highlighting, extension, ordering, and more.
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
[Docs](https://github.com/mnaoumov/obsidian-backlink-full-path/)
|
||||
|
||||
# Settings
|
||||
|
||||
Open **Settings -> Community plugins -> Backlink Full Path** to configure the pane. Each option below lists the setting key stored in the plugin's `data.json`.
|
||||
|
||||
## Which path to show
|
||||
|
||||
- `pathDepth` - how many parent folders to include (0 shows the whole path).
|
||||
- `rootPaths` - folders to treat as roots; paths under them are shown relative to the root.
|
||||
- `shouldReversePathParts` - render the path from the file outwards instead of from the root inwards.
|
||||
- `shouldShowEllipsisForSkippedPathParts` - show an ellipsis where parts were trimmed by `pathDepth` or a root.
|
||||
|
||||
## How it looks
|
||||
|
||||
- `shouldHighlightFileName` - visually emphasize the file name within the full path.
|
||||
- `shouldIncludeExtension` - keep the `.md` (or other) extension in the shown name.
|
||||
- `shouldDisplayParentPathOnSeparateLine` - put the folder path on its own line above the file name.
|
||||
|
||||
Change any of these and watch the Backlinks pane of [[Shared topic]] update live.
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[Docs](https://github.com/mnaoumov/obsidian-backlink-full-path/)
|
||||
|
||||
# Meeting (general notes)
|
||||
|
||||
A general meeting note. Related to [[Shared topic]].
|
||||
|
||||
The third note named `Meeting`; the Backlinks pane shows its path as `Notes`.
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[Docs](https://github.com/mnaoumov/obsidian-backlink-full-path/)
|
||||
|
||||
# Meeting (Project Alpha)
|
||||
|
||||
Notes from the Alpha project meeting. Related to [[Shared topic]].
|
||||
|
||||
This note is named `Meeting`, like two others in the vault - the Backlinks pane of [[Shared topic]] shows its full path, `Projects/Alpha`, to keep it distinct.
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[Docs](https://github.com/mnaoumov/obsidian-backlink-full-path/)
|
||||
|
||||
# Meeting (Project Beta)
|
||||
|
||||
Notes from the Beta project meeting. Related to [[Shared topic]].
|
||||
|
||||
Also named `Meeting`; in the Backlinks pane of [[Shared topic]] it is shown as `Projects/Beta` so you can tell it apart from the others.
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
This is an [Obsidian](https://obsidian.md/) vault demonstrating features of the [Backlink Full Path](https://github.com/mnaoumov/obsidian-backlink-full-path) plugin.
|
||||
|
||||
## Opening this vault
|
||||
|
||||
- **If you already have the plugin installed**, run the **Backlink Full Path: Open demo vault** command — it downloads and opens the latest demo vault automatically.
|
||||
- **Otherwise**, download `backlink-full-path.demo-vault.zip` from the [plugin releases](https://github.com/mnaoumov/obsidian-backlink-full-path/releases), unzip it, and in Obsidian choose `Manage vaults...` → `Open folder as vault` → select the unzipped folder.
|
||||
|
||||
On first open, Obsidian treats the vault as untrusted — choose **Trust author and enable plugins** (or enable Community plugins manually), then open [00 Start](<./00 Start.md>).
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[Docs](https://github.com/mnaoumov/obsidian-backlink-full-path/)
|
||||
|
||||
# Shared topic
|
||||
|
||||
This is the note whose backlinks the demo inspects. Open the **Backlinks** pane and look at the three `Meeting` notes that link here - each one shows its full folder path thanks to [[01 Backlink full path]].
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
// Per-vault startup script, run by the universal Demo Vault Helper plugin (via CodeScript
|
||||
// Toolkit's require) once CodeScript Toolkit is installed and enabled. This is where each
|
||||
// plugin's demo vault does its own startup setup. Here it just opens the landing note.
|
||||
|
||||
import type { App } from 'obsidian';
|
||||
|
||||
const START_NOTE_PATH = '00 Start.md';
|
||||
|
||||
// Run by CodeScript Toolkit on load (its `startupScriptPath` setting, which the Demo Vault Helper
|
||||
// points here). CST calls the exported `invoke` — a top-level script with no `invoke` export throws
|
||||
// `this.startupScript.invoke is not a function`.
|
||||
export async function invoke(app: App): Promise<void> {
|
||||
const startNote = app.vault.getFileByPath(START_NOTE_PATH);
|
||||
if (startNote) {
|
||||
await app.workspace.getLeaf(false).openFile(startNote);
|
||||
}
|
||||
}
|
||||
10
dprint.json
10
dprint.json
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"extends": "./node_modules/obsidian-dev-utils/dist/templates/dprint.json",
|
||||
"excludes": [
|
||||
"dist",
|
||||
"**/node_modules",
|
||||
"**/*-lock.json",
|
||||
"**/*.md",
|
||||
"demo-vault"
|
||||
]
|
||||
}
|
||||
|
|
@ -6,6 +6,6 @@
|
|||
"id": "backlink-full-path",
|
||||
"isDesktopOnly": false,
|
||||
"name": "Backlink Full Path",
|
||||
"version": "1.6.11",
|
||||
"version": "1.6.8",
|
||||
"minAppVersion": "1.12.7"
|
||||
}
|
||||
|
|
|
|||
572
package-lock.json
generated
572
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "backlink-full-path",
|
||||
"version": "1.6.11",
|
||||
"version": "1.6.8",
|
||||
"description": "Shows the backlink's full path in the backlinks panel.",
|
||||
"keywords": [],
|
||||
"homepage": "https://github.com/mnaoumov/obsidian-backlink-full-path#readme",
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
"@commitlint/cli": "^21.2.1",
|
||||
"@commitlint/config-conventional": "^21.2.0",
|
||||
"@commitlint/types": "^21.2.0",
|
||||
"@obsidian-typings/obsidian-public-latest": "^6.25.0",
|
||||
"@obsidian-typings/obsidian-public-latest": "^6.22.0",
|
||||
"@total-typescript/ts-reset": "^0.6.1",
|
||||
"@tsconfig/strictest": "^2.0.8",
|
||||
"@types/node": "^26.1.1",
|
||||
|
|
@ -62,8 +62,8 @@
|
|||
"jsdom": "^29.1.1",
|
||||
"nano-staged": "^1.0.2",
|
||||
"obsidian": "^1.13.1",
|
||||
"obsidian-dev-utils": "^87.3.0",
|
||||
"obsidian-integration-testing": "^9.1.0",
|
||||
"obsidian-dev-utils": "^85.1.0",
|
||||
"obsidian-integration-testing": "^6.2.0",
|
||||
"obsidian-test-mocks": "^3.6.0",
|
||||
"sass-embedded": "^1.100.0",
|
||||
"vitest": "^4.1.10"
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ export const config = defineConfig({
|
|||
test: {
|
||||
environment: 'node',
|
||||
fileParallelism: false,
|
||||
globalSetup: ['obsidian-integration-testing/vitest-global-setup-plugin'],
|
||||
globalSetup: ['obsidian-integration-testing/vitest-global-setup'],
|
||||
hookTimeout: BIG_TIMEOUT_IN_MILLISECONDS * HOOK_TIMEOUT_MULTIPLIER,
|
||||
include: ['src/**/*.desktop.integration.test.ts'],
|
||||
name: 'integration-tests:desktop',
|
||||
|
|
@ -72,7 +72,7 @@ export const config = defineConfig({
|
|||
test: {
|
||||
environment: 'node',
|
||||
fileParallelism: false,
|
||||
globalSetup: ['obsidian-integration-testing/vitest-global-setup-plugin'],
|
||||
globalSetup: ['obsidian-integration-testing/vitest-global-setup'],
|
||||
hookTimeout: PERFORMANCE_TIMEOUT_IN_MILLISECONDS,
|
||||
include: ['src/**/*.desktop-performance.integration.test.ts'],
|
||||
name: 'integration-tests:desktop-performance',
|
||||
|
|
@ -91,7 +91,7 @@ export const config = defineConfig({
|
|||
}
|
||||
},
|
||||
fileParallelism: false,
|
||||
globalSetup: ['obsidian-integration-testing/vitest-global-setup-plugin'],
|
||||
globalSetup: ['obsidian-integration-testing/vitest-global-setup'],
|
||||
hookTimeout: ANDROID_TIMEOUT_IN_MILLISECONDS * HOOK_TIMEOUT_MULTIPLIER,
|
||||
include: ['src/**/*.android.integration.test.ts'],
|
||||
name: 'integration-tests:android',
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
import process from 'node:process';
|
||||
import { registerDemoVaultCoverageSuite } from 'obsidian-dev-utils/script-utils/demo-vault-coverage';
|
||||
import { getRootFolder } from 'obsidian-dev-utils/script-utils/root';
|
||||
|
||||
// Keeps the in-repo `demo-vault/` in sync with the plugin's public surface WITHOUT
|
||||
// Launching Obsidian: it reflects the real config from source and asserts every
|
||||
// Setting is documented in a note, and that the guard note/member still exist
|
||||
// (rename drift). Backlink Full Path enhances the core Backlinks pane and exposes
|
||||
// No public API interface, so only the PluginSettings config class is reflected;
|
||||
// The plugin's runtime behavior is covered by the other integration tests.
|
||||
registerDemoVaultCoverageSuite({
|
||||
configInterfaces: [{ interfaceName: 'PluginSettings', sourcePath: 'src/plugin-settings.ts' }],
|
||||
interfaces: [],
|
||||
nonTrivialGuard: {
|
||||
expectDemoNote: '02 Settings.md',
|
||||
expectMember: 'pathDepth',
|
||||
interfaceName: 'PluginSettings',
|
||||
sourcePath: 'src/plugin-settings.ts'
|
||||
},
|
||||
rootFolder: getRootFolder() ?? process.cwd()
|
||||
});
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { getTempVault } from 'obsidian-integration-testing/vitest-global-setup-plugin';
|
||||
import { getTempVault } from 'obsidian-integration-testing/vitest-global-setup';
|
||||
import {
|
||||
describe,
|
||||
expect,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { getTempVault } from 'obsidian-integration-testing/vitest-global-setup-plugin';
|
||||
import { getTempVault } from 'obsidian-integration-testing/vitest-global-setup';
|
||||
import {
|
||||
describe,
|
||||
expect,
|
||||
|
|
|
|||
|
|
@ -120,12 +120,5 @@ describe('Plugin', () => {
|
|||
const plugin = await createLoadedPlugin();
|
||||
expect(castTo<SettingTabsHolder>(plugin).settingTabs__).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('should register the open demo vault command', async () => {
|
||||
const plugin = new Plugin(app, manifest);
|
||||
const addCommandSpy = vi.spyOn(plugin, 'addCommand');
|
||||
await plugin.onload();
|
||||
expect(addCommandSpy).toHaveBeenCalledWith(expect.objectContaining({ id: 'open-demo-vault' }));
|
||||
});
|
||||
});
|
||||
/* eslint-enable @typescript-eslint/no-extraneous-class -- End of test file. */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { OpenDemoVaultCommandHandler } from 'obsidian-dev-utils/obsidian/command-handlers/open-demo-vault-command-handler';
|
||||
import { PluginSettingsTabComponent } from 'obsidian-dev-utils/obsidian/components/plugin-settings-tab-component';
|
||||
import { PluginDataHandler } from 'obsidian-dev-utils/obsidian/data-handler';
|
||||
import { PluginBase } from 'obsidian-dev-utils/obsidian/plugin/plugin';
|
||||
|
|
@ -33,14 +32,5 @@ export class Plugin extends PluginBase {
|
|||
pluginSettingsComponent
|
||||
})
|
||||
);
|
||||
|
||||
this.commandHandlerComponent.registerCommandHandlers([
|
||||
new OpenDemoVaultCommandHandler({
|
||||
app: this.app,
|
||||
pluginId: this.manifest.id,
|
||||
pluginNoticeComponent: this.pluginNoticeComponent,
|
||||
pluginVersion: this.manifest.version
|
||||
})
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,5 @@
|
|||
"1.6.5": "1.12.7",
|
||||
"1.6.6": "1.12.7",
|
||||
"1.6.7": "1.12.7",
|
||||
"1.6.8": "1.12.7",
|
||||
"1.6.9": "1.12.7",
|
||||
"1.6.10": "1.12.7",
|
||||
"1.6.11": "1.12.7"
|
||||
"1.6.8": "1.12.7"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue