feat(collections): add per-collection slugify option for path indexing#400
Open
feat(collections): add per-collection slugify option for path indexing#400
Conversation
Add `slugify` option to collection config (default: true) that controls whether filenames are converted to kebab-case during indexing. Setting `slugify: false` preserves original filenames with spaces and uppercase characters, fixing path resolution for tools like qmd-search-obsidian. Made-with: Cursor
e882f6b to
3fbb30a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
slugifyoption to theCollectioninterface (default:truefor backward compatibility)slugify: false, filenames are stored as-is during indexing, preserving spaces, uppercase, and special charactersBASS PLAYER Lesson 02.mdwhich were previously slugified tobass-player-lesson-02.mdMotivation
QMD normalizes filenames to kebab-case during indexing via
handelize(). This breaks path resolution for downstream tools (e.g. qmd-search-obsidian) when files have spaces or uppercase characters in their names. Making it configurable preserves backward compatibility while letting users opt in to original-path preservation.Usage
Test plan
slugify: true) still handleizes paths to kebab-caseslugify: falsepreserves original filenames with spaces and uppercaseslugify: falseslugify: falsecontaining files with spaces, verifyqmd search --jsonreturns correct pathsMade with Cursor