We are excited to announce our official support for sshfs.
sshfs
will allow users to mount their blog and sites like any other drive. So
you'll be able to view, edit, create, remove, and move folders and files like a
normal filesystem!
Some use cases we think are impactful:
- Debug production sites
- Run cli commands on your production sites
- Grep/find files across all your sites
- Create a development site that you use as a pgs dev server
- Make quick edits to a blog post live
- Run a formatter on your blog posts
- Easier and faster than git-ops (add+commit+push+wait-for-cicd)
usage #
First your need to install sshfs
.
blog with prose #
mount your prose.sh blog:
1mkdir ~/blog
2sshfs prose.sh:/ ~/blog
3# edit files using your favorite editor
4nvim ~/blog/hello-world.md
5# changes are published live!
6
7# unmount
8umount ~/blog
sites with pages #
mount your pgs.sh sites:
1mkdir ~/sites
2sshfs pgs.sh:/ ~/sites
3# edit files using your favorite editor
4nvim ~/sites/myproj/index.html
5# changes are published live!
mount a single site:
1# image you have a static-site builder
2cd ~/my_site
3# mount your ssg's output folder
4sshfs pgs.sh:/my_site ./public
5# edit files using your favorite editor
6nvim tmpl/base.html
7# run ssg build command
8# changes are published live!
So what's the downside? Well it's a little slower than a hard drive on your machine. We are still experimenting with the technology so quirks or bugs might come up. We would love to get your feedback.
We will be updating our docs to include sshfs
as an option for managing your
blog and sites.