Add ability to pass commands to Portable Jekyll #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this change, you can still use
setpath.cmdto open a command prompt and enter Jekyll commands, like before.Plus, you can now pass a command which will be executed.
This is useful to create batch files which you can simply double-click to execute something via Portable Jekyll:
1. Building your project with the Jekyll version from Portable Jekyll
Create a batch file in your project's folder with the following content:
Executing this batch file will use the Portable Jekyll version in the specified path to build/serve your project.
I often use batch files to run Jekyll when I need to supply additional configuration settings and I'm too lazy to type
jekyll serve --foo bar --baz xyzby hand each time.2. Executing a Ruby script using the Ruby version from Portable Jekyll
A batch file with this content will terminate after execution (
cmd /kwon't), so I can call it from another batch file.(my use case: I have an existing batch file backing up stuff from my machine, and I needed to run wunderlist-backup from it, so my Wunderlist data is included in the backup)