diff --git a/posts/faq.md b/posts/faq.md index 30cebc3..6dff6a0 100644 --- a/posts/faq.md +++ b/posts/faq.md @@ -78,7 +78,7 @@ This accepts the default file location. At the prompt, type a secure passphrase. # How can I setup my `ssh-agent`? -your SSH agent typically hosts your SSH keypairs and serves them when +Your SSH agent typically hosts your SSH keypairs and serves them when authenticating with an SSH server. So, ensuring your `ssh-agent` is setup properly is important when connecting to us. diff --git a/posts/file-uploads.md b/posts/file-uploads.md index 22b1330..6a86427 100644 --- a/posts/file-uploads.md +++ b/posts/file-uploads.md @@ -66,6 +66,68 @@ sftp> put hello-world.md echo 'put hello-world.md' | sftp {service} ``` +## sshfs + +Requirement: [sshfs](https://github.com/libfuse/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) + +### blog with prose + +mount your prose.sh blog: + +```bash +mkdir ~/blog +sshfs prose.sh:/ ~/blog +# edit files using your favorite editor +nvim ~/blog/hello-world.md +# changes are published live! + +# unmount +umount ~/blog +``` + +### sites with pages + +mount your pgs.sh sites: + +```bash +mkdir ~/sites +sshfs pgs.sh:/ ~/sites +# edit files using your favorite editor +nvim ~/sites/myproj/index.html +# changes are published live! +``` + +mount a single site: + +```bash +# image you have a static-site builder +cd ~/my_site +# mount your ssg's output folder +sshfs pgs.sh:/my_site ./public +# edit files using your favorite editor +nvim tmpl/base.html +# run ssg build command +# 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. + # How do I update files? Just send us the files you want to update. With [pgs.sh](/pgs) you can upload @@ -74,10 +136,6 @@ single files to projects, but we also support "deploying" static sites with # How do I delete files? -We have a couple ways to delete files depending on your use-case. - -## sftp - The easiest way to delete a file is via `sftp`. ```bash @@ -85,6 +143,8 @@ sftp {service} sftp> rm hello-world.md ``` +You could also mount our services via `sshfs` and then delete it that way. + # How do I download files? Using the same tools described [here](#how-do-i-upload-files), just reverse the diff --git a/posts/getting-started.md b/posts/getting-started.md index 1a00cab..aa599f8 100644 --- a/posts/getting-started.md +++ b/posts/getting-started.md @@ -11,7 +11,7 @@ order to be granted access you will need to create an account. We don't need your email address, all we need is an SSH keypair. So before you begin, please make sure you have a valid SSH keypair or -[generate one](/faq#generating-a-new-ssh-key). +[generate one](/faq#how-do-i-generate-an-ssh-key). To get started, simply use SSH: diff --git a/posts/ui.md b/posts/ui.md index 53b4a75..342ad77 100644 --- a/posts/ui.md +++ b/posts/ui.md @@ -3,8 +3,6 @@ title: UI description: user interfaces at pico --- -We have two user interfaces: SSH TUI and a Web UI. - # SSH TUI With this TUI you can perform a few basic operations like: create an account, @@ -16,29 +14,13 @@ To use the TUI just SSH into our site: ssh pico.sh ``` -# Web UI - -This is an experimental web-based UI leveraging [web tunnels](/tunnels). +# SSH CLI -To use the web UI, create an SSH local forward connection to our [pgs](/pgs) -site: +Many of our services make use of the user providing argument to `ssh`: ```bash -ssh -L 1337:localhost:80 -N pico-ui@pgs.sh -``` - -Then open your browser and navigate to [localhost:1337](http://localhost:1337). - -## SSH Config - -The SSH tunnel command can be quite a lot to remember if you aren't using it -consistently everyday. Instead, you can setup an SSH config entry to do all the -work for you, here is an example config entry inside `~/.ssh/config`: - -``` -Host ui - User pico-ui - Hostname pgs.sh - LocalForward 0.0.0.0:1337 localhost:80 - SessionType none +ssh pico.sh help +ssh pgs.sh help +ssh prose.sh help +ssh imgs.sh help ``` diff --git a/tmpl/pager.partial.tmpl b/tmpl/pager.partial.tmpl index 24c7092..2a9f9a3 100644 --- a/tmpl/pager.partial.tmpl +++ b/tmpl/pager.partial.tmpl @@ -1,23 +1,23 @@ {{ define "pager" }}