Skip to content

[Feature Request] add optional searchable raw text export #64

Open
@s-light

Description

@s-light

Clear and concise description of the problem

if i import a bunch of files and like to implement a text-based search i would like to have the raw markdown-text - or even better - a raw text version of the final renderd thing -
in the second option that would mean that all plugins could do there magic and i get the magic in the searchable text too..

Suggested solution

just a similar option to exportFrontmatter
like exportSearchableContent
and if set, there is an additionally field in the module export named searchableContent

Alternative

maybe this is already possible via some hacky-way in the transforms-after..

other ideas to implement a nice searching way is also welcome.

currently i am doing a second import with the ?raw switch set..

const getPartsContent = () => {
    return import.meta.glob(`../../public/mks/parts/*/readme.md`, {
        eager: true,
    })
}
const getPartsContentText = () => {
    return import.meta.glob(`../../public/mks/parts/*/readme.md`, {
        query: '?raw',
        eager: true,
    })
}

and then combining the output to an object with the needed keys...

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions