-
Notifications
You must be signed in to change notification settings - Fork 342
Change nginx layout of --open #667
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
Conversation
When you run a build with `--open` we start a web server locally and open up a browser window for you to look at them. With the docker-based `build_docs` that server is nginx. nginx is fancy, and one of the things that we can do pretty easily is lay out the files that we serve so they look fairly like the public web site. This change does just that and it should come in handy to test future work we plan to do that generates an nginx config to deploy to the site serving the docs.
build_docs
Outdated
@@ -234,7 +234,7 @@ def run_build_docs(args): | |||
# is weird. If we tell it that the browser's name is `open` | |||
# we'll get whatever the user set as their default browser. | |||
environ['BROWSER'] = 'open' | |||
webbrowser.open('http://localhost:8000', new=1, autoraise=False) | |||
webbrowser.open('http://localhost:8000/guide', new=1, autoraise=False) |
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 is the new path. It mirrors the public site nicely when you do ./build_docs --all --open
@@ -710,7 +710,7 @@ sub serve_and_open_browser { | |||
if ( not $running_in_standard_docker ) { | |||
sleep 1; | |||
say "Press Ctrl-C to exit the web server"; | |||
open_browser("http://localhost:8000/$open_path"); | |||
open_browser("http://localhost:8000/"); |
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 is always the path when you build the docs with ./build_docs.pl
which doesn't support --all
.
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.
Stay fancy.
Thanks for reviewing @Jarpy! |
When you run a build with
--open
we start a web server locally andopen up a browser window for you to look at them. With the docker-based
build_docs
that server is nginx. nginx is fancy, and one of the thingsthat we can do pretty easily is lay out the files that we serve so they
look fairly like the public web site. This change does just that and it
should come in handy to test future work we plan to do that generates an
nginx config to deploy to the site serving the docs.