npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vinggit/custom-file-explorer-sorting-support

v0.11.0

Published

Use Obsidian Custom File Explorer Sorting specifications in Quartz navigation.

Readme

Custom File Explorer Sorting Support for Quartz

Use the same sorting-spec frontmatter in Obsidian and on a Quartz 5 site.

This plugin reads the syntax from SebastianMC's Custom File Explorer Sorting plugin. It applies those rules to Quartz's stock Explorer and folder-page directory overviews, and exposes the same ordering to compatible navigation plugins such as Root Index Panels.

It releases in version lockstep with Root Index Panels and Root Books Toolkit. Matching versions are the tested combination; 0.9.0 is the first coordinated release.

Install

From the root of a Quartz 5 site:

npx quartz plugin add github:VingGit/custom-file-explorer-sorting-support

Enable it in quartz.config.yaml:

plugins:
  - source: github:VingGit/custom-file-explorer-sorting-support
    enabled: true
    order: 35

The regular npx quartz plugin commands own the generated .quartz/plugins/ copy. Do not edit that generated copy by hand.

Use

Put a YAML block in the note that owns a folder's rules. index.md works naturally with Folder Notes:

---
sorting-spec: |
  < a-z by-metadata: created
---

At the vault root, that example orders first-level folders by the created property on each folder's index.md. Inside a folder, its own index.md can declare a different rule:

---
sorting-spec: |
  Introduction
  Chapter \\d+ ...
  Appendix \\R+ ...
  --% drafts.md
---

The full upstream grammar is accepted, including explicit groups, file/folder groups, prefixes and suffixes, numeric/Roman/date tokens, primary and secondary ordering, priorities, combined groups, macros, exact/name/wildcard/regular-expression folder targets, metadata extractors, bookmarks, icons, advanced folder dates, standard sorting, and VS Code Unicode sorting. See EXAMPLES.md for Quartz-specific examples and the upstream project for the complete syntax reference.

Quartz mappings

Most rules use Quartz data directly. A few Obsidian integrations need a documented Quartz equivalent:

| Obsidian feature | Quartz behavior | | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | File creation/modification time | Uses Quartz dates, then matching frontmatter dates as a fallback. | | Folder-note metadata | Uses index.md first and a same-name folder note as fallback. | | Bookmark order | Uses a positive numeric bookmarks-order frontmatter property. | | Folder/file icons | Uses icon, then panel.icon, in frontmatter. | | standard / UI-selected sorting | Uses Quartz's stable folder-first, natural alphabetical order because a generated site has no Obsidian sort-menu state. | | --% and /--hide: | Hides the exact item from navigation only. The page is still built and remains reachable by URL or links. |

The plugin validates every published sorting-spec during the build. A malformed specification fails the build with the upstream parser's location and error instead of silently publishing the wrong order.

Options

plugins:
  - source: github:VingGit/custom-file-explorer-sorting-support
    enabled: true
    options:
      specProperty: sorting-spec
      bookmarksOrderProperty: bookmarks-order
      iconProperty: icon

| Option | Default | Purpose | | ------------------------ | ----------------- | ------------------------------------------------------------------------- | | specProperty | sorting-spec | Frontmatter property containing the multiline sorting specification. | | bookmarksOrderProperty | bookmarks-order | Positive numeric property used for bookmark ordering and bookmark groups. | | iconProperty | icon | Property used by with-icon: groups; panel.<property> is also checked. |

How it works

During a Quartz build, the plugin parses the source notes with the upstream parser and emits static/custom-file-explorer-sorting.json. A small browser script applies that deterministic order whenever the Explorer or a folder-page directory overview renders, including after SPA navigation. Compatible server-rendered navigation plugins use a versioned in-process sorting service, so the root book selector and nested sidebars follow the same rules before HTML is written.

The upstream parser is pinned to an audited commit. A scheduled weekly compatibility workflow tests the newest upstream checkout and deliberately alerts when the commit or version changes, even if the existing conformance suite still passes.

Integration test vault

The repository includes a self-contained test vault. Its first-level folders cover every sorting order recognized by the upstream parser, including both directions and aliases, plus metadata extractors, secondary ordering, groups, priorities, matching rules, integrations, and navigation-only hiding.

The Quartz integration workflow builds that same vault twice:

  • with the stock Explorer and this plugin;
  • with the stock Explorer, this plugin, and Root Index Panels.

Both generated sites are checked for the sorting manifest, all fixture pages, the Explorer and folder-page browser adapters, and the Root Index Panels book order. Successful non-PR runs publish the two builds together as the repository's GitHub Pages site. The workflow runs only for relevant changes, on manual request, and once a week against the current Quartz 5 branch.

Development

npm ci
npm run check
npm run build
npm run test:upstream
npm run test:integration

dist/ is committed because Quartz installs Git-sourced plugins from their prebuilt output.

Release tags equal the package version without a leading v.

License

GPL-3.0-only. The package bundles parser code from Custom File Explorer Sorting; attribution and the pinned revision are recorded in THIRD_PARTY_NOTICES.md.