You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,3 +47,17 @@ Files and directories starting with "." are ignored.
47
47
Files and directories starting with "_" have special meaning: `_config.toml`, `_content`.
48
48
49
49
Anything else will be directly served to the clients requesting it.
50
+
51
+
## Unsigned content
52
+
53
+
If you want to use Servus in the same way you would use a traditional SSG, by editing markdown files directly, without using a Nostr client to post, you can still do that. The only thing you need in that case is a **Nostr private key** that you pass using an environment variable in addition to the `--sign-content` flag.
What happens if you do this is the following... when Servus tries to parse a Nostr event from a `.md` file and it fails due to the event being incomplete (missing ID, signature, etc) it generates a fresh event on the fly and signs it with the provided *secret key*. That new event is only held in memory and served to Nostr and HTTP clients. If you want to edit it, you should edit the original `.md` file and restart Servus. Servus will not write anything back to the `.md` file.
60
+
61
+
Files that look like `yyyy-mm-dd-slug.md` will become posts and files that look like `slug.md` will become pages.
62
+
63
+
Note: this `SERVUS_SECRET_KEY` key is different from the `pubkey` present in the `_config.toml` file! In fact the two are mutually exclusive. That is, if you decided to pass `--sign-content` and a secret key, your sites **cannot** also have a pubkey. This essentially means that content managed in this way cannot be edited from Nostr clients and you have to do it by manually editing `.md` files!
0 commit comments