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
add "-o" option to serve command which opens server URL #4144
Conversation
This is broken on Linux (and I don't think it will work on Windows) either, |
aha, that's what worried me. Is there any safe way to do this with multiple platform support, or is this a lost cause? |
would it be crazy to do something like this? It might not be safe to assume that python is installed. |
|
alright, updated to include different OS commands. (note to self: create PR's off of fork branches and not fork master) |
/cc @jekyll/core |
👍 I know in our Rakefile, we use Launchy to open the built Jekyll site for the |
@@ -45,7 +46,24 @@ def process(options) | |||
file_handler_options | |||
) | |||
|
|||
Jekyll.logger.info "Server address:", server_address(s, options) | |||
server_address = server_address(s, options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this reassignment of server_address
is confusing – could you rename the variable on the left here, please?
ok, fixed the naming of the variable. I'll keep in mind Launchy for stuff like this in the future, too. |
Hi Jekyll maintainers,
We were setting up a new Jekyll blog to play around and thought it would be helpful to add a "-o" option to the serve command. This option would open the URL of the server on the device's default browser. We used the "system" ruby method, but we're not sure if that's your preferred approach to opening URL's. It's also unclear if this would work on Windows, as we only tested this on OS X.
We're happy to modify this request to open the URL in a different way, if there are issues with the current implementation. All the unit tests passed when we ran them locally.
cc @Ckearns1210