benbalter / jekyll-relative-links

A Jekyll plugin to convert relative links to markdown files to their rendered equivalents
MIT License
141 stars 37 forks source link

Configuration options for specific directories #49

Closed jeff-matthews closed 5 years ago

jeff-matthews commented 5 years ago

Is your feature request related to a problem? Please describe the problem you're trying to solve.

First of all, thank you for building this plugin! It's been a huge help.

I only need to run this plugin on a specific directory in my project. Running it on all directories increases the build time by ~100%. I only need to run this on select directories.

Describe the solution you'd like

I'd like to be able to specify which directories to run this on in the _config.yml file.

I expect the plugin to ignore all other directories not explicitly specified in the config file so that my build time doesn't increase so profoundly.

Describe alternatives you've considered

Using absolute links in the directory in question.

Additional context

I have an abnormally large set of files to process due to an ineffective versioning strategy, so I have to build multiple versions at once instead of by branch. See magento/devdocs.

Any help or guidance on how I can customize this plugin to acheive this goal would be highly appreciated! Thanks!

benbalter commented 5 years ago

@jeff-matthews thanks for your issue! I'd be glad to review a pull request to add an "exclude" or similar configuration if you're willing to submit one! :smile:

jeff-matthews commented 5 years ago

Thanks @benbalter! I don't have a lot of Ruby experience, but I'll see what I can come up with.

benbalter commented 5 years ago

I believe you can largely copy https://github.com/jekyll/jekyll/blob/master/lib/jekyll/entry_filter.rb#L59, passing site.jekyll_relative_links.exclude instead of site.exclude to filter documents in the generator.