Cannot parse event from content
when I start servus it finds sites, themes and templates, it starts server, but it Cannot parse event from content (pages and posts, those who previously worked)
servus::site Cannot parse event from /.../_content/posts/test.md.
servus::site Cannot parse event from /.../_content/pages/posts.md.
servus::site Cannot parse event from /.../_content/pages/index.md.
metadata on those pages:
---
title: 'title'
author: 'author'
---
or
---
title: 'title'
date: 'YYYY-m-d'
---
Right, so I recently made this breaking change... I though nobody will notice since nobody is using this, but seems I am wrong. :)
Basically I used to allow pages/posts to be anything as long as they had a title/date.
But now they need to have all the fields to be valid Nostr events, including a signature.
So the way to post now is by using a Nostr client, such as Yakihonne, unsigned content will not work anymore.
I am thinking I might just make a command line tool to sign pages such as the ones you show above, in case somebody wants to post by editing the text files. But I also think that will not happen, there are better tools at posting this way (like Zola), I don't see why somebody would use Servus to do what can be better done with Zola.
What is your use case? Do you actually want to post by editing the files? Or are you just wondering why it worked and now it doesn't?
Nooo! I was able to generate valid pages using emacs and org-mode before and it was great! An editor and some simple text to generate pages for a site that was distributed p2p, seemed to me the exceptionality of servus. If you can only use a nostr client I don't find it very useful
How about I make it such that you can still post like before, but in that case the posts / pages will be automatically signed (using some key in your config, perhaps).
The problem is... you need a key if you want other Nostr clients to be able to read your content.
What I had before was a bit misleading actually, you could generate posts from org-mode indeed, and they would show up on your website, but they would not be served to other Nostr clients requesting them, because the content was unsigned.
Basically there were 2 kinds of content - Nostr content (signed) and regular content that was only visible on the web. I simplified by dropping unsigned content. You maybe even didn't notice that, and that was a problem, you were thinking your content is available to Nostr clients, but it was not, since it was unsigned.
I have my pubkey in config.toml but unfortunetly servus still cannot parse pages and now I also get this error:
tide::log::middleware Client error --> Response sent
message Failed to render 'index.html'
Caused by:
Variable `config.extra.hyde_theme` not found in context while rendering 'index.html'
(hyde theme is in config.toml)
same error creating a new site from scratch (through servus)
If you can only use a nostr client I don't find it very useful
@sch1z00 Another idea - how if I make a simple command line Nostr event signer, so you pipe the content from org-mode into the signer, which outputs signed content, which you then save to a file? Would that cover your use case?
I am trying to avoid supporting both signed and unsigned content in the server itself.
Would that cover your use case?
that's what i'm doing with a simple elisp script that uses nak to sign and publish anything :)
OK, so I think I came up with a nice way to do it. Have a look at unsigned content.
Having an issue with the release build though... If you build from source, it should be fine.
... If you build from source...
I always build from source but it still doesn't parse my old pages
but it still doesn't parse my old pages
Same error? Did you pass --sign-content?
Same error?
Yes
Did you pass
--sign-content?
Yes
Then it should just work. Did you try whether it works, using the browser? See the terminal output after the error message, it should say something like Generated new event... it generates an event on-the-fly from the (incomplete, unsigned) data and uses that to serve a resource over HTTP and Nostr protocol.