Quickadd feature for link saving
This commit is contained in:
@@ -14,6 +14,8 @@ Minimal self-hosted personal wiki. Folders are pages.
|
||||
|
||||
- **Special folder types** folders can opt into custom rendering (e.g. a photo diary with calendar navigation). See the [Special Folder Types](#special-folder-types) section for details.
|
||||
|
||||
- **Quick-add bookmarklet** save the current browser tab to a predetermined wiki page (e.g. `/Topics/Bookmarks/`) with one click. See the [Quick-Add Bookmarklet](#quick-add-bookmarklet) section.
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
@@ -79,3 +81,19 @@ Each diary root exposes three stable paths intended for browser bookmarks. They
|
||||
| `<diary>/today/` | `<diary>/YYYY/MM/DD/` (or `…/?edit` if the day folder does not exist yet) |
|
||||
| `<diary>/this-month/` | `<diary>/YYYY/MM/` |
|
||||
| `<diary>/this-year/` | `<diary>/YYYY/` |
|
||||
|
||||
## Quick-Add Bookmarklet
|
||||
|
||||
Replace `wiki.host` with your wiki host and `/Topics/Bookmarks/` with the destination page (one bookmarklet per target):
|
||||
|
||||
```javascript
|
||||
javascript:(function(){var s=window.getSelection().toString().trim();var t=s||document.title;var u=location.href;var to='/Topics/Bookmarks/';var q='?to='+encodeURIComponent(to)+'&url='+encodeURIComponent(u)+'&title='+encodeURIComponent(t);window.open('https://wiki.host/quickadd'+q,'quickadd','width=480,height=320');})();
|
||||
```
|
||||
|
||||
Each save appends an entry of the following form to the destination page's `index.md`:
|
||||
|
||||
```markdown
|
||||
- [Example Page](https://example.com)
|
||||
2026-05-11 14:30
|
||||
optional comment
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user