Skip to content

imshenshen/obsidian-sticky-heading

Repository files navigation

Obsidian Sticky Heading Plugin

CleanShot 2024-01-22 at 21 45 12@2x

CleanShot.2024-01-22.at.21.28.23.mp4

config

when use different theme, the space of sticky heading is different, so you need install Style Settings plugin which allows you to config top space when sticky.

known issues

flicker when setting stickyType to 'prevToH1'

when setting stickyType to 'prevToH1', When you scroll the screen and the number of sticky headings changes, the sticky heading container will flicker. This is because the plugin needs to calculate the position according to the current number of sticky headings.

not work for reading mode

This plugin mainly aims to solve the problem of: when writing in fragmented time, I often forget which heading level I am currently at, or which level I should use for the next heading.

If there is significant demand for this feature in reading mode, we will consider implementing it. Pull requests are welcome.

Releasing new releases

  • Update your manifest.json with your new version number, such as 1.0.1, and the minimum Obsidian version required for your latest release.
  • Update your versions.json file with "new-plugin-version": "minimum-obsidian-version" so older versions of Obsidian can download an older version of your plugin that's compatible.
  • Create new GitHub release using your new version number as the "Tag version". Use the exact version number, don't include a prefix v. See here for an example: https://github.com/obsidianmd/obsidian-sample-plugin/releases
  • Upload the files manifest.json, main.js, styles.css as binary attachments. Note: The manifest.json file must be in two places, first the root path of your repository and also in the release.
  • Publish the release.

You can simplify the version bump process by running npm version patch, npm version minor or npm version major after updating minAppVersion manually in manifest.json. The command will bump version in manifest.json and package.json, and add the entry for the new version to versions.json