Skip to content

Commit 9b3f8bb

Browse files
Add guidance to kp preview regarding accessing preview when run on remote systems.
1 parent e980350 commit 9b3f8bb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

scripts/kp

+11-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,17 @@ if args.action == 'preview':
128128
config=None,
129129
INDEXING_ENABLED=False)
130130

131-
url = 'http://127.0.0.1:{}/post/{}'.format(port, post_path)
131+
url = 'http://localhost:{}/post/{}'.format(port, post_path)
132+
print(
133+
"Previewing knowledge post at: {}\n\n"
134+
"If you are using `kp` locally, a browser window will shortly open at "
135+
"this address. Otherwise, please replace `localhost` with the hostname "
136+
"of the server upon which you are running this script, and manually "
137+
"point your browser at the resulting url.\n\n"
138+
"When you are ready to exit the preview, simply kill this process using "
139+
"`<Ctrl> + C`.\n"
140+
.format(url)
141+
)
132142
threading.Timer(1.25, lambda: webbrowser.open(url)).start()
133143

134144
KnowledgeDeployer.using('flask')(

0 commit comments

Comments
 (0)