Note Peek

by pesstudios
5
4
3
2
1
Score: 50/100

Description

Obsidian plugin: show just the first or last few lines (or one section) of another note, unfold the rest in place. Works inside callouts and admonitions.

Reviews

No reviews yet.

Stats

0
stars
16
downloads
0
forks
3
days
3
days
3
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
3
commits

Latest Version

3 days ago

Changelog

First public release.

  • note-peek code block: first/last N lines (lines, from: end) or one section (section, [[Note#Heading]], ^block-id) of another note
  • “… N more lines” unfolds the rest in place (more: expand, default), more: open opens the note instead, ↗ / Ctrl+click always opens it
  • skips frontmatter, comments, code blocks and note-only embed lines by default (code, embeds)
  • updates live when the note changes; works inside callouts and Admonition blocks; desktop and mobile

README file from

Github

Note Peek

Show just a peek of another note — its first (or last) few lines, or one section — with a link to the rest.

A normal embed (![[note]]) always shows the whole note. Note Peek shows only as much as you want, so a long list or log fits nicely into a dashboard, a callout or an admonition.

Usage

```note-peek
file: [[Shopping list]]
lines: 4
```

Renders the first 4 lines of Shopping list and, below them, a link like … 12 more lines · ↗. Clicking more lines unfolds the whole note right there (and show less folds it back); ↗ or Ctrl/Cmd+click opens the note.

It works anywhere a code block works — including inside callouts and Admonition blocks:

````ad-summary
title: Desk
```note-peek
file: Desk
lines: 4
```
````

The peek updates automatically when the note changes.

Options

Option Default Meaning
file — The note: [[Note]], [[Note|alias]], Note, folder/Note.md. [[Note#Heading]] peeks into that section.
lines 5 How many lines to show, or all.
from start end shows the last lines instead (handy for logs and journals).
section — Show only the content under this heading (section: Ideas), or the block with this id (section: abc123 for ^abc123).
more expand What the “… N more lines” link does: expand unfolds the rest in place, open opens the note, false hides the link.
code false Include code blocks (dataviewjs, …). Each block counts as one line.
embeds false Include lines that only embed other notes (e.g. a navigation bar). Image embeds are always shown.

What counts as a line: every non-empty line of the note. Frontmatter, blank lines and %% comments %% are never counted; blank lines between the shown lines are kept, so paragraphs stay paragraphs.

Compatibility

Works on desktop and mobile. No settings, no data stored.

Installation

Manually: download main.js, manifest.json and styles.css from the latest release into <vault>/.obsidian/plugins/note-peek/ and enable the plugin.

License

MIT