diff --git a/snippets/README.md b/snippets/README.md
index 2512408..900a972 100644
--- a/snippets/README.md
+++ b/snippets/README.md
@@ -7,6 +7,16 @@ Insert reusable text snippets into your notes via a selection dialog.
- **Scripting › Insert snippet** — choose a snippet from the list and insert it at the cursor
- **Scripting › Manage snippets** — add, edit, or delete snippets
+You can also link those actions to a custom shortcut.
+
+## Actions
+
+One toolbar button is registered:
+
+| Button | Action |
+| ----------- | ---------------------------------------------------------- |
+| **Snippet** | choose a snippet from the list and insert it at the cursor |
+
## Placeholders
Placeholders are replaced at insertion time.
diff --git a/snippets/info.json b/snippets/info.json
index 334aed6..3200522 100644
--- a/snippets/info.json
+++ b/snippets/info.json
@@ -1,12 +1,12 @@
{
"name": "Text Snippets",
"identifier": "snippets",
- "version": "0.1.0",
+ "version": "0.1.1",
"script": "snippets.qml",
"authors": ["@luginf"],
"platforms": ["linux", "macos", "windows"],
"minAppVersion": "26.4.11",
- "description": "Insert and manage reusable text snippets with placeholders ($CURRENT_YEAR, $CURRENT_DATE, $UUID…) into notes.",
+ "description": "Insert and manage reusable text snippets.\n\nUsage\nYou can create templates of reusable text snippets from the custom actions menu 'Manage Snippets'. Then add them to your notes with 'insert snippets' from the same menu. \nYou can also use placeholders ($CURRENT_YEAR, $CURRENT_DATE, $UUID...) which will be replaced at insertion time.",
"resources": [
"InsertSnippetDialog.qml",
"ManageSnippetsDialog.qml",
diff --git a/snippets/snippets.json b/snippets/snippets.json
index 4a73afd..06036ac 100755
--- a/snippets/snippets.json
+++ b/snippets/snippets.json
@@ -1,10 +1,10 @@
[
{
- "content": "## Reference\n\nid$CURRENT_YEAR$CURRENT_MONTH$CURRENT_DATEx$CURRENT_HOUR$CURRENT_MINUTE$CURRENT_SECOND\n\n\nSee also:\n- \n- \n\n#tag",
- "name": "Reference"
+ "content": "## References \n\n$CURRENT_YEAR$CURRENT_MONTH$CURRENT_DATE$CURRENT_HOUR$CURRENT_MINUTE$CURRENT_SECOND\n\n\nSee also:\n- \n- \n\n#tag",
+ "name": "References"
},
{
- "content": "id$CURRENT_YEAR$CURRENT_MONTH$CURRENT_DATEx$CURRENT_HOUR$CURRENT_MINUTE$CURRENT_SECOND",
+ "content": "$ZK_ID\n\n",
"name": "Zettelkasten_id"
}
]
diff --git a/zettelkasten/README.md b/zettelkasten/README.md
index e4b6260..f81e647 100644
--- a/zettelkasten/README.md
+++ b/zettelkasten/README.md
@@ -6,7 +6,15 @@ A QOwnNotes script that adds [Zettelkasten](https://en.wikipedia.org/wiki/Zettel
In the Zettelkasten method, each note carries a **permanent unique ID** embedded in its content or filename. Links between notes are based on this ID, not on the filename. This means a note can be renamed freely without breaking any link pointing to it.
-This script implements that principle inside QOwnNotes using the native `[[filename|id]]` wiki-link format.
+This script implements that principle inside QOwnNotes using the native `[[filename|id]]` wiki-link format. You will need to activate Settings>Interface>Editor>'Enable wiki-style link support [[note name]]'.
+
+## Usage
+
+- **Scripting › Insert Zettelkasten ID** — Insert a new unique ZK ID at the cursor position
+- **Scripting › insert Zettelkasten link** — Open a searchable dialog to pick a note and insert a `[[filename\|id]]` link
+- **Scripting › Repair Zettelkasten links** — can all notes and repair every link whose filename is out of date
+
+You can also link those actions to a custom shortcut.
## Link format
@@ -14,12 +22,12 @@ This script implements that principle inside QOwnNotes using the native `[[filen
[[MyNote|20260430143012]]
```
-- The left part (`MyNote`) is what QOwnNotes uses to resolve the link (Ctrl+click to open).
+- The left part (`MyNote`) is what QOwnNotes uses to resolve the link (Ctrl+click to open). Only the note name is used — subfolder paths are never included, because QOwnNotes resolves wiki-links by filename regardless of the folder the note is in.
- The right part (`20260430143012`) is the permanent ZK ID, used by this script to repair links when the filename changes.
## Actions
-Three toolbar buttons are registered:
+Three toolbar buttons are registered, following the custom actions listed above:
| Button | Action |
| ----------- | ---------------------------------------------------------------------------- |
diff --git a/zettelkasten/info.json b/zettelkasten/info.json
index 23078b3..d0d2036 100644
--- a/zettelkasten/info.json
+++ b/zettelkasten/info.json
@@ -1,11 +1,11 @@
{
"name": "Zettelkasten",
"identifier": "zettelkasten",
- "version": "0.2.0",
+ "version": "0.2.1",
"script": "zettelkasten.qml",
"authors": ["@luginf"],
"platforms": ["linux", "macos", "windows"],
"minAppVersion": "26.4.11",
- "description": "Zettelkasten support: generates configurable note IDs and inserts [[filename|ID]] wiki-links to notes detected by a configurable ECMAScript ID pattern.",
+ "description": "Generates configurable note IDs and inserts links supporting those IDs using the Zettelkasten method. \n\nUsage\nSelect 'Insert Zettelkasten ID' from the custom actions menu will create a unique ID into your file. You can configure the ID pattern to your liking in the script options, using an ECMAScript regeg. \nThen you can insert from an other document a link to the first one, using the 'insert Zettelkasten link' from the custom actions menu. You can select the correct link using a filter from filename or the ID, and it will create a [[filename|ID]] wiki-links to notes. The detection pattern has also to be configured into the plugin options, to match the ID generation (the default option will match the preconfigured ID pattern anyway).\nIf you later rename your note, using from the custom actions menu 'Repair Zettelkasten links' will automatically search and rename every link whose filename is out of date, based on the correct ID.",
"resources": ["ZkLinkDialog.qml"]
}
diff --git a/zettelkasten/zettelkasten.qml b/zettelkasten/zettelkasten.qml
index 557671d..445776d 100644
--- a/zettelkasten/zettelkasten.qml
+++ b/zettelkasten/zettelkasten.qml
@@ -92,17 +92,12 @@ Script {
}
// Returns the link target string for [[target|id]] given a note object.
+ // QOwnNotes resolves wiki-links by filename only, regardless of subfolder,
+ // so we never include the relative directory path.
function noteLinkTarget(note) {
var name = note && note.name ? note.name : "";
- if (name) {
- var relativeDir = note.relativeNoteFileDirPath || "";
- if (relativeDir) {
- relativeDir = relativeDir.replace(/[\/\\]+$/, "");
- return relativeDir ? relativeDir + "/" + name : name;
- }
+ if (name)
return name;
- }
-
return /\.txt$/i.test(note.fileName) ? note.fileName.slice(0, note.fileName.length - 4) : note.fileName;
}