Update: the extension this relied on isn’t published anymore and the author archived the GitHub repo – there doesn’t appear to be any notice or explanation posted. The most recent GitHub issues were people complaining about various protocols not working anymore so perhaps something changed in VSCode’s API that broke the extension. There do not appear to be any other extensions published right now that provide webdav connectivity via VSCode’s virtual filesystem API
Anyone want to build one?
Every emergence site makes its application filesystem to developers for live editing via the WebDAV protocol. The /develop
endpoint serves as the base URL for the WebDAV filesystem, so the root URL to connect with any WebDAV client would look like https://example.org/develop
. Opening that URL in a browser will load a browser-based editor that can use that same WebDAV interface.
How each WebDAV client accepts configuration varies, here I’ll cover one way to connect from Visual Studio Code:
-
Log in to the site you want to edit, and then visi
/login?format=json
for easy access to copy your session handle -
Install the Remote Workspace extension
-
Create or open an existing multi-root workspace
-
Use the
File → Open…
command (as opposed toFile → Open Workspace…
) to to open your.code-workspace
file for manual editing (as opposed to actually loading the workspace, which should already be loaded) -
Add a new object to the
"folders"
array:{ "name": "my-site", "uri": "webdav://$session:MY_SESSION_HANDLE@my-site.example.org/?base=develop/&ssl=0", }
-
$session
should be kept as the username whileMY_SESSION_HANDLE
is replaced with your session handle obtained in step 1 -
ssl=0
should be changed tossl=1
if your site supports HTTPS
-
-
Save your changes to the
.code-workspace
file, the remote root should immediately load in your editor’s file tree. Any time you save further changes to this file it should refresh/reconnect automatically.