From 55cb318035cc936abd23decf56ab09da5131cd2a Mon Sep 17 00:00:00 2001 From: Tom Stuart Date: Mon, 25 Sep 2023 08:05:31 +0100 Subject: [PATCH] Add `--host` advice to `docc preview` instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because `localhost` only allows connections on the loopback interface, anybody who’s trying to run `docc preview` on a remote server and connect to it with their local browser will need to use `--host 0.0.0.0` or similar. --- CONTRIBUTING.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6f544f4ff2..00f7fe7f15 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -288,7 +288,10 @@ Monitoring ~/Developer/swift-docc/Sources/SwiftDocC/SwiftDocC.docc for changes.. ``` And if you navigate to you'll see -the rendered documentation for `SwiftDocC`. +the rendered documentation for `SwiftDocC`. If your browser isn't running on +the same computer as Swift-DocC, you may need to provide the server's public +host name or IP address (or just `0.0.0.0`) with the `--host` option to allow +the browser to connect. ### Using Docker to Test Swift-DocC for Linux