dgrigg / hugo-lunr

Node module for creating lunr.js search indexes for static Hugo sites
71 stars 18 forks source link

Make index generation more flexible #11

Closed leonrosenshein closed 2 years ago

leonrosenshein commented 2 years ago

This PR updates the indexing to be more flexible in some ways and more restrictive in one significant way.

More flexible:

Less flexible: The current system uses grey-matter to handle markdown files and assumes all other files are HTML. On my site this caused the index to include Javascript and image files. This PR changes the file walker to only process .md and .html files. Optionally (based on the verbose flag above), skipped files are noted on the console.

dgrigg commented 2 years ago

@leonrosenshein merging this in. I'm not actively maintaining this project any longer.