Skip to content

Enhance AutoIndexer to make it easy to filter files #41

@TomFreeman

Description

@TomFreeman

Our use-case is similar to seen elsewhere.

Create a public / private documentation file out of a single set of shared specifications.

We could do this by manually indexing the "public" file, and using autoIndexer for the "private" one, but that seems laborious.

AutoIndexer doesn't seem to have a good extension point for this, so at the moment the best approach I can see would re-create a significant amount of AutoIndexer just to add the filter step in the middle.

The preferred approach at this point would be to enable users to create a "filteredPathsIndexer" in their own repo like so:

import AutoIndexer from '@/AutoIndexer';

export default function (): string { 
	return AutoIndexer.getIndexYaml(this.env.globals.currentFilePointer, 
		{    
			paths: true,
			filterFunction: (path) => { return true; }
		});}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions