8000 GitHub - wlo2/Outlineus · GitHub
[go: up one dir, main page]

Skip to content
wlo2Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Outlineus

Outlineus shows which sections of a note are on screen in the core Outline view. A thin track follows the heading depth with curved joins, and an accent segment with a moving dot marks the visible range.

It works in Live Preview, Source mode and Reading mode, and uses your theme's colors.

Part of the Noetic Suite.

Features

  • The highlight moves smoothly as you scroll or jump to a heading, and it follows headings as you collapse them.
  • A small dot marks headings with Marginalius notes in their section.
  • Collapsed headings can stay collapsed after you switch notes or restart.
  • Headings can show their Markdown, such as bold, highlights, links, tags and math.
  • You can hide the Outline view's header buttons and keep its search box open.

Install for development

npm install
npm run build

Copy main.js, manifest.json and styles.css to <vault>/.obsidian/plugins/outlineus/, then enable the plugin under Settings → Community plugins.

npm run dev rebuilds on change. npm test runs the unit tests.

Settings

  • Join style: curved or straight joins where the depth changes.
  • Moving dot: show the dot at the leading edge of the highlighted range.
  • Ignored bottom area: how much of the viewport's bottom doesn't count as on screen, so a heading peeking in doesn't light up.
  • Track inset: gap between the track and the collapse arrows.
  • Hide indentation guides: hide the Outline view's own guide lines.
  • Hide header buttons: hide the Outline view's search, auto-scroll and collapse buttons, and keep its search box open.
  • Marginalia dots: show a dot next to headings with Marginalius notes in their section. A collapsed heading also shows the dots of the headings inside it. On by default. Marginalius 0.3.0 or later must be enabled.
  • Remember collapsed headings: keep a note's headings collapsed in the Outline view after you switch notes or restart. Off by default. They're saved in the plugin's data.json, by note path and heading text, so a renamed heading opens expanded.
  • Render Markdown in headings: show bold, highlights, links, tags and other formatting in the Outline view, using Obsidian's own Markdown renderer. Off by default. Links and tags are only for show: clicking a heading always jumps to it. Headings with images or embeds stay plain, and so do headings that match a search while it's open.
  • Animate with reduced motion: keep the track's animation when your system is set to reduce motion. Off by default, so the track jumps instead of moving on those systems.

Compatibility

Requires Obsidian 1.13.1 or later.

The plugin decorates the core Outline view, which has no public API. It reads that view's internal row tree and the editor's CodeMirror instance. When asked to, it also opens the view's internal search box, collapses its rows and replaces their text. Because of this, an Obsidian update can stop it from drawing. All access to the Outline's internals is in src/outline-dom.ts. If those internals are missing, the plugin leaves the outline undecorated.

The plugin doesn't use the network, collect telemetry, or read files outside the vault.

Credits

The track path and highlight logic are ported from the "On this page" panel in Fumadocs: fumadocs-ui 16.17.5, dist/components/toc/default.js, MIT License, Copyright (c) 2023 Fuma. Its notice ships in main.js.

Local changes: the plugin measures row positions from the Outline view's DOM instead of using fixed offsets, sums arc lengths per join instead of scanning along the path, and lights rows from the note's scroll position instead of an IntersectionObserver.

License

GPL-3.0, see LICENSE. The code ported from Fumadocs stays under its MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0