Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JekyllWebmentionIO.js, why source folder? #41

Closed
0xdevalias opened this issue Jul 14, 2017 · 9 comments
Closed

JekyllWebmentionIO.js, why source folder? #41

0xdevalias opened this issue Jul 14, 2017 · 9 comments

Comments

@0xdevalias
Copy link
Contributor

Just curious, why're you generating the JekyllWebmentionIO.js into the source folder? I think in my original gem version (would have to check), I used a generator to just make it go straight into the 'build' folder when the site is generated. No need to clutter up the source that way.

See: https://github.com/alias1/jekyll-webmention_io/blob/convert-to-gem/lib/jekyll-webmention-io/webmention_js_generator.rb

@aarongustafson
Copy link
Owner

aarongustafson commented Jul 17, 2017

The reason I did that was to enable folks to modify the JS source if they wanted to. Also to allow them to use their own bundlers (I use Gulp, for instance).

I can make it configurable if you would like. Maybe by setting js.destination to false?

@0xdevalias
Copy link
Contributor Author

0xdevalias commented Jul 17, 2017 via email

@aarongustafson
Copy link
Owner

I will look into the pass-through. Manual modification might be necessary if you use a custom HTML template and need to tweak the JS. After publishing & modifying it, you’d want to turn off the auto-build.

Mostly it’s for tools like Webpack, Gulp & Grunt though.

@0xdevalias
Copy link
Contributor Author

That makes sense

@aarongustafson
Copy link
Owner

Ok, I tried to make it work and in order to get Jekyll to load the static file into the destination folder as part of the Jekyll build, the file needs to exist in the source folder. I tried making it work without it and I also tried removing the file after processing and neither worked (Ruby errors). Sorry, but it looks like you’re going to have to live with a file being output.

That said, you can totally configure where it’s going to be put.

@0xdevalias
Copy link
Contributor Author

0xdevalias commented Jul 19, 2017 via email

@aarongustafson
Copy link
Owner

aarongustafson commented Jul 19, 2017 via email

@0xdevalias
Copy link
Contributor Author

@aarongustafson
Copy link
Owner

2.6.0 includes the source: false option. Thanks for the pointer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants