Solid Plume - simple blog app

@kidehen I’ve no plans to add features for now.

My aim has been to get Plume working, easy to use and deploy, and updated to use the current auth API. I have almost completed all that and will merge the changes to gh-pages when I’ve tested on my pod. At the moment I accidentally put them on the wrong branch, but [now fixed so] they are pushed if anybody needs them sooner.

1 Like

Plume v0.10

I’ve now completed my update of Plume for the time being and provided a simpler deployment path and tagged the release as v0.10.

Status and Changes

Plume is now fairly easy to deploy and very easy to use. All you need is a Solid pod, although it is also easy to deploy it to a separate web server.

I have not added any features. Instead this update is focussed on upgrading Solid to use the latest Solid API (rdflib.js and solid-auth-client), fixing bugs, and streamlining the user experience during first use, post creating and editing, as well as for blog visitors.

I’ve updated the README and provided a Deployment Guide (on my own Plume blog instance).

Please report any problems and bugs either under github issues or on this topic.

Notes:

  • @bourgeoa I’ve removed the need for a .acl file as you suggested. Thanks!
  • I’ve been thinking I might make one more small enhancement: adding metadata to the HTML for link previews (eg when you share a link to your blog on twitter etc). I’ll look into that a bit. I was helped by an interesting chat with someone using a link shortener, which I suggested he reconsider due to privacy concerns. He was doing so for aesthetic reasons only and went into it in some depth for which I’m grateful because he’s pointed me to how to provide this feature. In the end he realised using a link shortener didn’t do what he wanted and has stopped using them. Win win! :slight_smile:
5 Likes

This is awesome! Was able to deploy it on https://rom.solid.community/blog - but it requires a login to view. Is this the intention?

1 Like

@rom. Seems that the login flow works for your blog… but once i’ve Authenticated using my solid community id I get a not authorized on the url you’ve shared. Sharing my experience in case this helps any debugging efforts.

2 Likes

@rom hey, that’s cool. Thanks for giving it a try. I will need to look at the guide again because it may be possible to improve it so this doesn’t happen so easily.

No, this is because you didn’t deploy it under ‘/public’ (an easy thing to miss in the deployment guide as there are several steps). You either need to do that, or make sure the Plume/blog directory is readable by anyone.

You can fix this by changing the permissions on your ‘/blog’ directory to give read access to everyone. I’m not sure exactly what the steps are to do this, but if you login to your pod, browse to your root folder (’/’) and then to ‘/blog’ you might able to set this in the Solid databrowser UI (maybe using the ‘rainbow’ icon). But as you now have Plume there this might not work - actually, thinking about it, I’m pretty sure it won’t but let me know if you try it. You would need to use solid-filemanager to disable Plume first, by renaming the /blog/index.html file to something else (eg index.txt) temporarily, and then changing it back after you make the directory public.

Can anyone confirm that it is possible to change permissions this way, and give more precise instructions?

If not we can set up a ‘.acl’ file for it together, but that’s tricky so I suggest waiting for help. I’m doing family stuff over the holiday but might find a moment.

@einsty thanks for the report. What you reported is expected because you don’t have read access to his /blog directory.

I’ve been thinking I might make one more small enhancement: adding metadata to the HTML for link previews (eg when you share a link to your blog on twitter etc). I’ll look into that a bit.

I was helped by an interesting chat with someone who was using a link shortener on twitter which I suggested he reconsider due to privacy concerns.

He was doing so for aesthetic reasons only and went into it in some depth for which I’m grateful because he’s pointed me to how to add the metadata for previews. In the end he realised using a link shortener didn’t do what he wanted and has stopped using them. Win win! :slight_smile:

See forum discussion on Web Metadata for publishing

Yes it possible to change the permissions with the rainbow pane. It has to be done by the pod owner.

Anyhow the best is to delete the actual plume and to reinstall it under /public at least for the /posts folder.
The webapp can be anywhere. I have it on an other web server (a non Solid pod one).

This isn’t necessary. The posts will be under /public by default, wherever you install Plume.

So it should be possible to rename the index.html, change the permissions to ‘read by anyone’ as described, and then restore the name of index.html.

You can of course do as @bourgeoa suggests and just install Plume in /public/blog instead, because that will be readable by anyone, by default.

Thanks. Still continuing to debug.

Thanks. I tried moving it, but still no go. Will try to reinstall later and see.

2 Likes

Hi, just wanted to report that I got it working on my private pod after some hazzle with the installation - and it looks really nice, good work!

About the hazzle, I’m not quite sure what’s going on but I started by uploading and extracting the zip file (using solid-filemanager) to a folder under the public section. Then I moved the folder to a new name (public/blog) as I had forgotten to rename the zip before upload, and updated config.txt to match the URL paths. Then I opened /public/blog to check if it worked, but the interface looked really odd and nothing worked. Scratched my head a bit and then took a closer look at the files, and noticed that many files and directories had been converted to .ttl files - which obviously broke the whole thing. I’m not sure if it was solid-filemanager or the solid server, or perhaps the default data browser which did this, but I kept the “broken” install folder for reference - this is how it looked:

LICENSE README.md app config.txt css$.ttl favicon.png img$.ttl index.html js$.ttl manifest.json$.txt popup.html posts

Anyway, I decided to just do it the “oldschool” way - uploaded the zip file directly to the server, and unzipped the files into the public/blog folder, bypassing the solid servers file handling. And now it worked much better - the app started with myself already logged in (as specified in config.txt), and I could write a new post and admire the pretty result! :smiley:

I haven’t tested the rest of the plume functionality yet, but it looks promising so keep up the good work!

I also wonder how I may installed it in a more shared way - you wrote that the app itself can be anywhere, but in my experience (so far) it looks like solid apps works best when they’re hosted under the same domain as the pod. So two questions:

  1. If I install the app elsewhere, do the config.txt file still have to be on the app folder, or is there a way to configure the app from the blog folder instead, so it can be shared by more users/blogs?
  2. Does anyone know if it’s possible to share apps on the main solid domain, so all pod users on the same domain can use the same apps? This isn’t only for this app but in general - I’ve tried to figure out how to do it, for example by adding an apps folder in the data folder for the main domain. But getting ACL errors when I try to open them, and not quite sure how to set the correct ACL for the main domain (if it’s possible).

Anyway, here’s my test blog, if you wanna check if it works as expected: https://stein.solid.nett.org/public/blog/

1 Like

Hi @ztein, I’ve tried to reproduce your bug to check if the issue occurs in the solid-filemanager, but couldn’t reproduce the bug.
What I’ve tried:
-> Download solid-plume-0.10.zip
-> Upload it via the solid-filemanager to /public/
-> Rename the extracted folder to “blog”
-> Rename config-example.txt to config.txt and change owner and posts settings in it
-> Open “blog” in new tab

When opening it, everything looks fine and I can also create posts. Did you make something differently to achieve this behavior, or do these steps result in those .ttl files for you? Also please make sure to use the latest version of solid-filemanger (this link and also make a full refresh. Versioning of this app is still not very user friendly -_-).

1 Like

Hi @A_A, I tried a bit more now and can reproduce it. It happens when I rename the folder - after renaming those directories have turned into ttl.

But note that I’m running the solid-filemanager from the same domain, hosted locally - I’m not able to login with the online version, so downloaded it and put it into an apps folder on the same pod. Not sure if that makes any difference, but using the version I found here: https://github.com/Otto-AA/solid-filemanager/tree/gh-pages

1 Like

Tried again with another file (the zip from solid-filemanager), and same thing happened now. It also looks like it’s the same files and folders that are converted to ttl: .json files and js + css folder. Isn’t that a bit odd?

That’s great, thanks for giving it a go and overcoming the early adopter hurdles! Credit goes mainly to Andrei Sambra for the app, with bugfixes, updating and tweaks after that by Sergey Malinin/@kidehen and myself.

The hazzle looks like issues with the solid-filemanager / server interface. I note that the symptoms are similar to a problem I had trying to get Plume to write to a ‘.json’ file. In the end I switched to ‘.txt’ to avoid that (although I’ve subsequently removed the need for Plume to write the config). It seems to me the server is either not getting the headers it expects, or is just not behaving as it should. My guess is the latter, so it may help to know what version of server your pod uses, but I’ll leave that investigation to @A_A if that’s ok with him! :slight_smile:

If I install the app elsewhere, do the config.txt file still have to be on the app folder, or is there a way to configure the app from the blog folder instead, so it can be shared by more users/blogs?

Plume requires config.txt to be in the app folder (i.e. along with index.html). You can add other authors to it, although I have not tested this. It might just work, so by all means try:

  • add WebIDs to the owners setting (as a comma separated list)
  • ensure each of those WebIDs is given write access to your /public/posts directory.

You can also relocate the ‘posts’ directory if you want it elsewhere by setting the full path as postsURL in config.txt, but you will have to make sure the folder is readable by anyone, and also writeable by each of the owners.

If you try the above it would be great to hear how you get on!

Does anyone know if it’s possible to share apps on the main solid domain, so all pod users on the same domain can use the same apps?

I think this is quite tricky so in my limited update I haven’t thought about it much. Maybe it is something that @kidehen knows how to do?

2 Likes

Yeah sounds like the same problem, and also happens with css and js folders on my server. I’m running Solid server (v5.0.1) inside a docker container, with apache2 proxy in front.

1 Like

@ztein Could you change the copyFile method in src/Api/Api.js to following and try it again?

export async function copyFile(originPath, originName, destinationPath, destinationName) {
    const fileResponse = await fetchFile(originPath, originName);
    const contentType = fileResponse.headers.get('Content-Type');
    const content = (contentType === 'application/json') ?
        await fileResponse.text()
        : await fileResponse.blob();

    // Note: Not passing contentType as parameter as this would lead to errors when creating .json files
    return createItem(destinationPath, destinationName, content);
}

I can’t reproduce it with the solid.community version (I think it’s NSS 4.x.x, so it’s probably an incompatibility with NSS v5.x) and don’t have a v5 pod for testing it so it maybe fixes it and maybe does nothing.

And could we move this bug discussion to github or the forum post so we don’t litter this thread too much?

2 Likes

Discussion on Web metadata for Plume:

If you could run posts through a part of speech tagger like https://github.com/dariusk/pos-js , and then put the results in an RDF graph, then they could be available for SPARQL update queries which could add tags that depend on concepts in the text.

1 Like

Plume v0.11

A minor update: Plume now includes basic semantic metadata when displaying a blog post. This is inserted into the DOM programmatically so you can’t view it using ‘View source’ but you can see it using a tool such as @kidehen’s excellent Structured Data Sniffer plugin for Firefox.

Example:

Also bugfixes.

  • remove spurious ‘#’ appended to post URLs, which were also messing up saved post RDF/Turtle
  • fixed browser tab titles (which were not showing the post title)

Status

Plume is now fairly easy to deploy and very easy to use. All you need is a Solid pod, although it is also easy to deploy it to a separate web server.

I’ve updated the README and provided a Deployment Guide (on my own Plume blog instance).

Please report any problems and bugs either under github issues or on this topic.

1 Like