|
|
Subscribe / Log in / New account

Federated blogging with WriteFreely

By Jonathan Corbet
March 15, 2019
Your editor has never been a prolific blogger; a hard day in the LWN salt mines tends to reduce the desire to write more material for the net in the scarce free time that remains. But, still, sometimes the desire to post something that is not on-topic for LWN arises. Google+ has served as the outlet for such impulses in recent years, but Google has, in its wisdom, decided to discontinue that service. That leaves a bereft editor searching for alternatives for those times when the world simply has to hear his political opinions or yet another air-travel complaint, preferably one that won't vanish at the whim of some corporation. Recently, a simple blog-hosting system called WriteFreely came to light; it offers a platform that just might serve as a substitute for centralized offerings.

WriteFreely is written in Go and released under the Affero General Public License, version 3; WriteFreely version 0.8.1 was released at the beginning of February. The project is clearly relatively young: a look at the project's public Git repository shows a total of 275 non-merge commits from nine developers. Only two of those developers exceeded ten commits, though, and one is responsible for 241 of them (and 99% of the code). For the security-conscious, numbers like that are a bit of a red flag; it seems likely that few eyeballs have passed over this body of code.

That one author, Matt Baer, is the founder of write.as, a commercial blogging site built with the WriteFreely code. Would-be contributors are expected to sign an expansive contributor license agreement that, seemingly, grants both the owning company (called "A Bunch Tell") and any other recipient the right to distribute the code under any license.

Installation and setup

WriteFreely is not generally packaged by distributors, so users must obtain a copy directly from the project's site. A Linux x86-64 binary is available, but your editor, naturally, preferred to build from source. After all, a local build is more secure, even if one hasn't actually looked at the code being built, right? Any such notions were quickly abandoned, though, after typing "make"; the build process immediately goes off and downloads several dozen packages from a whole range of GitHub repositories. There is no way to get a real handle on what it is pulling in, or to verify that any of those packages are what they claim to be. This is discouraging, given the experience (and more experience) of how this kind of build process can go bad. Kids these days definitely have different ideas about how software should be built and distributed. [Update: the situation is not as bad as portrayed here; see the comments for more information.]

There is a configuration file that controls how WriteFreely works; it is not particularly complex, but there is a menu-driven mode to generate it interactively anyway. The biggest decision that needs to be made is whether it will host a single blog, or whether it will operate in a multi-user mode where users can create accounts that will each be able to host multiple blogs. Once that's done, WriteFreely can either run standalone with its own built-in HTTP server (which claims to be able to handle TLS when configured with the certificate and key files) or behind a proxy server.

The standalone mode is fine for trying things out, but using a "real" web server as a proxy is probably the way to go when hosting something exposed to the Internet. Among other things, that makes TLS support with a certificate from Let's Encrypt easy. (As an aside, it is impressive just how easy Let's Encrypt has made things; there really is no excuse for a site that throws certificate warnings or lacks TLS support entirely anymore.) WriteFreely has achieved its goal of making it possible to set up a new blogging site with a minimum of effort.

The result can be seen over here thanks to an idle domain your editor has been hanging onto for a while. At least, it can be seen there for a while; no promises about that site's permanence are made at this point, and future readers may be disappointed. (Update: the site has since been taken down).

Writing freely

When WriteFreely is configured in the multi-user mode, the top-level page it serves to unauthenticated users provides a little form for account creation and an extensive advertisement (including an embedded video) for the software itself. There is [WriteFreely landing page] no way to change that front page within the system itself. It does not take much searching, though, to find the template files for the built-in page and tweak them. It would sure be nice if the templating language (and, in particular, the specific resources available to templates in WriteFreely) were actually documented, but one can't have everything.

For a logged-in user, though, the view changes to a blank page with the word "Write" and a few grayed-out icons at the top. The intent is to provide a distraction-free writing environment, and it would appear to succeed; there is little distraction to be found in a blank page. One is expected to enter one's prose, then hit the arrow up top to post the result, either to the blog or to a drafts folder. Text is formatted using Markdown, unless one would rather use HTML; WriteFreely simply accepts either and tries to do the right thing with them. There is probably more in the way of interesting features but, as of this writing, the writer's guide is a little on the sparse side.

Posted text is formatted cleanly, without a lot of extra markup — it's meant to be read. There is little control over the appearance provided to writers beyond the ability to chose between a serif and a sans-serif font. There is a mechanism by which a relatively advanced user can provide custom CSS declarations for a given blog and some minimal documentation on the classes in use. For the most part, it seems that one is not meant to mess around much with the appearance of the site.

There is no support for hosting images in the WriteFreely system; the write.as guide suggests that, to put an image in a post, one should "first upload it somewhere on the web and get its URL, then use markdown or HTML in your post". That is likely to work better for some users than others; naturally, write.as comes with a commercial option that includes image hosting.

In the multi-user mode, the first account created has administrative privileges; subsequent users do not. The administration screen can view the current users and their information, but makes no provision for changing anything. There is no way, for example, to silence or remove an account that is making abusive posts, no way to moderate posts, and no way to take down a problematic post. Some of those things could certainly be done by typing SQL at the underlying database (SQLite and MySQL are supported; no PostgreSQL, alas), but that's no way to run a site. The administrative side of WriteFreely will need some enhancements before it can be used to host accounts from untrusted users.

There is, though, a flag that controls whether new accounts can be created or not. If account creation is disabled, the administrator can send out invitations (in the form of special URLs) to enable specific people to create accounts anyway.

Users can create multiple blogs under their account, up to an administrator-controlled limit. That feature can be used to allow authors to segregate different types of posts. Thus, for example, readers who are only interested in your editor's complaints about the weather can be spared the indignity of reading his political opinions. Until one gets to climate, at least. Users can export their data at any time in a handful of different formats; there is no provision for importing data from elsewhere, though.

Syndication, federation, and export

WriteFreely automatically creates an RSS feed for each blog. There does not appear to be a way to get a feed for the site as a whole, which could be a nice feature for some types of installations. It also claims support for the ActivityPub protocol so that, for example, blog posts can be followed by Mastodon users. Mastodon appears to be the intended means by which others can comment on blog posts; there is no comment-posting feature built into WriteFreely itself. Your editor, not being a Mastodon user, has not had a chance to play with this aspect of the system, but it could prove to be an important piece if the vision of moving away from centralized platforms ever comes to fruition.

The world is full of blogging systems. Many of them are hosted by companies that try to make money with ads, abuse their users' data, or may turn off the whole thing if the CEO has a bad day — or all of those things. Compared to those business models, the simple flat-fee structure used by write.as comes as a breath of fresh air. Other blogging systems are free software, but many suffer from a high level of complexity. WriteFreely tries to address these problems by providing a blogging platform that is simple to set up and simple to use while providing most of the features that somebody focused on blogging might want.

Will your editor maintain a WriteFreely site as the new outlet for his rare non-Linux writings? That remains to be seen. But WriteFreely does have most of the features that would really be needed to implement such a system. The current lack of code review and seemingly uncontrolled build system are the source of legitimate worries; hopefully those will be addressed as more developers discover the project. Meanwhile, it provides a way to keep a blog under one's own control and tie into other federated systems with a minimum of administrative fuss; that is hard to complain about.


to post comments

Federated blogging with WriteFreely

Posted Mar 15, 2019 21:26 UTC (Fri) by unixbhaskar (guest, #44758) [Link]

Looks interesting Jon!

Federated blogging with WriteFreely

Posted Mar 15, 2019 22:20 UTC (Fri) by me@jasonclinton.com (subscriber, #52701) [Link] (17 responses)

Have you considered a static site generator? They seem to be all the rage and I'm quite happy with the one that I'm using. Most of them allow authorship in Markdown and the images that are embedded in the posts are uploaded with the rest of the static content so there is no image hosting problem, per se. No comment section, of course. But some offer integration with Discuss or other options. Or, since the comment sections on the internet are always difficult to manage, you can avoid tcomment section entirely.

Static site generators

Posted Mar 15, 2019 22:29 UTC (Fri) by corbet (editor, #1) [Link] (16 responses)

I've not looked at static site generators, probably should. Can you name the one you're using?

The lack of comments leaves me rather less than upset in general...the last think I need is another comment area to manage!

Static site generators

Posted Mar 15, 2019 22:35 UTC (Fri) by rahulsundaram (subscriber, #21946) [Link]

Nikola, Hugo etc seem to do everything that you appear to care about in WriteFreely. They are also far more healthier projects with a larger set of contributors and users. They are not federated and there is no activitypub support etc but it looks like all you need is a static site anyway.

Static site generators

Posted Mar 15, 2019 22:42 UTC (Fri) by andrewsh (subscriber, #71043) [Link] (3 responses)

I use Pelican, it’s written in Python, which is (for me) a huge benefit over Jekyll and its derivatives, since it’s written in a programming language I can actually understand and write in.

Static site generators

Posted Mar 16, 2019 11:05 UTC (Sat) by smurf (subscriber, #17840) [Link] (2 responses)

So is Nikola.

Some of the static-site systems even have a Web editor, which sounds strange but happens to be quite convenient.

Static site generators

Posted Mar 16, 2019 17:24 UTC (Sat) by edgewood (subscriber, #1123) [Link] (1 responses)

Any you could recommend? I support the web site of an organization I'm involved with, and they went with WordPress a few years ago to allow it to be updated by nontechnical users. I think I've finally got it locked down mostly satisfactorily, but it would be nice to test a more secure but still friendly alternative.

Static site generators

Posted Mar 16, 2019 20:18 UTC (Sat) by gdiscry (subscriber, #91125) [Link]

Lektor has not been mentioned yet. It provides a web interface to edit the content and there is a clear separation between the structure of a site and its content.

Static site generators

Posted Mar 15, 2019 22:43 UTC (Fri) by me@jasonclinton.com (subscriber, #52701) [Link]

Static site generators

Posted Mar 16, 2019 0:31 UTC (Sat) by ay (subscriber, #79347) [Link] (3 responses)

You can still have comments in static site generators by hooking up to Discourse. That's what many people do with GitHub pages or gitlab hosting.

A static site generator makes a lot of sense to me since it's easy to host (even for free) and nothing of value is lost versus a CMS type system.

Static site generators

Posted Mar 22, 2019 23:08 UTC (Fri) by smitty_one_each (subscriber, #28989) [Link] (2 responses)

I think you may have meant https://disqus.com/
Which is ubiquitous, but you sort of don't know where they're kept and whose getting up to what with them, and that could be irksome.

Static site generators

Posted Mar 25, 2019 14:41 UTC (Mon) by downey (subscriber, #117086) [Link] (1 responses)

Can't say with 100% confidence, but pretty sure the commenter did in fact mean Discourse, the wildly popular GPLv2 forum platform.

Specifically, embedding comments via this method: https://meta.discourse.org/t/embedding-discourse-comments...

Static site generators

Posted Mar 25, 2019 20:26 UTC (Mon) by smitty_one_each (subscriber, #28989) [Link]

Excellent.

Disqus is just a comments-only plug-in => https://en.wikipedia.org/wiki/Disqus

Jekyll as a static site generator for blogging

Posted Mar 16, 2019 1:01 UTC (Sat) by michaelkjohnson (subscriber, #41438) [Link] (2 responses)

I recently moved to using jekyll as the static site generator for my blog — I just git commit and push, and shortly thereafter it's updated. I like being able to track my blog history in Git. I've been thinking about running Git on my android phone to push blog entries when I'm away from my computer, but somehow it doesn't seem sufficiently important. ☺

Jekyll as a static site generator for blogging

Posted Mar 26, 2019 12:11 UTC (Tue) by arnout (subscriber, #94240) [Link] (1 responses)

> I've been thinking about running Git on my android phone to push blog entries when I'm away from my computer

You can just use the online editor of gitlab, which also allows you to preview md files.

Jekyll as a static site generator for blogging

Posted Mar 26, 2019 22:37 UTC (Tue) by michaelkjohnson (subscriber, #41438) [Link]

Thank you, I had totally not considered that. It would have been simpler. Very good thought.

In the meantime, I installed Markor and Mgit on my phone and blogged that way after all. Not that musings.danlj.org has that many visitors, so probably the tree fell in the forest and no one cared whether it made a noise.

Static site generators

Posted Mar 16, 2019 2:38 UTC (Sat) by zlynx (guest, #2285) [Link]

Static sites can have comments. You just arrange things to generate a new static page which includes the comment after a comment is posted.

That takes the same amount of time as generating a dynamic page and can be reused by every visitor until a new comment is added.

Static site generators

Posted Mar 16, 2019 8:37 UTC (Sat) by pbonzini (subscriber, #60935) [Link]

The QEMU website uses Jekyll, which also powers GitHub pages. One advantage for us was that contributions are done with the usual mailing list workflow.

A couple years ago I wrote a tutorial at https://opensource.com/article/17/4/getting-started-jekyll based on my experience building qemu.org.

Static site generators

Posted Mar 23, 2019 20:08 UTC (Sat) by spwhitton (subscriber, #71678) [Link]

There is also ikiwiki, one of the first static site generators, which has a web editor too.

Federated blogging with WriteFreely

Posted Mar 16, 2019 9:17 UTC (Sat) by xanni (subscriber, #361) [Link]

I tried to subscribe to either your RSS feed or your ActivityPub feed with Hubzilla, but unfortunately neither worked.

Federated blogging with WriteFreely

Posted Mar 16, 2019 10:32 UTC (Sat) by ms (subscriber, #41272) [Link] (4 responses)

Re building and "downloading several dozen packages". The project is at least using go.mod and so the downloads are fully pinned to git commits/tags and checksummed. So it's not quite the wild west of "let's just download the latest version of foo and hope for the best". Personally, I much prefer pointers to vendoring all your deps, but I know opinions differ on that.

They're using the built-in Go webserver which as far as I know has an excellent security record - I would have no worries about exposing it directly to the internet; I have used it a lot commercially/professionally.

The template language *is* documented. It's the standard Go templating system. https://golang.org/pkg/text/template/ https://golang.org/pkg/html/template/
That said, I agree about documenting which resources/methods/vars are available to the templates. The template entry point is Execute or ExecuteTemplate, and the last arg to that is always the "receiver" for the template, but eg https://github.com/writeas/writefreely/blob/cb1bd37f64abc... is unhelpful given it comes in as the empty interface. Generally I consider use of the empty interface in Go as a code smell... https://github.com/writeas/writefreely/blob/32e99d00415c6... is somewhat more discoverable. OTOH, depends on the intended audience - I've been working professionally in Go for over 5 years now so I have no qualms digging through this.

Just FTR, I've no association with WriteFreely and have never heard of it or looked at the code base before this morning.

Downloading packages

Posted Mar 16, 2019 13:56 UTC (Sat) by corbet (editor, #1) [Link] (3 responses)

From my reading, it's using a bunch of "go get" commands, with no version pinning in sight anywhere. Are those version strings hidden somewhere that I'm unaware of?

Downloading packages

Posted Mar 16, 2019 14:12 UTC (Sat) by ms (subscriber, #41272) [Link] (2 responses)

"go get" inspects the go.mod and go.sum files in the root of the project.

https://github.com/writeas/writefreely/blob/master/go.mod
https://github.com/writeas/writefreely/blob/master/go.sum

There's been an awful lot of thinking that has gone into this mechanism, and whilst it's not quite finished in Go 1.12, it's pretty close these days. There's a lot of writing about it all at https://research.swtch.com/vgo

Downloading packages

Posted Mar 16, 2019 14:23 UTC (Sat) by corbet (editor, #1) [Link] (1 responses)

OK, clearly I'm pretty ignorant about how Go packaging works, and it's not as bad as I had feared. Thanks for enlightening me.

Downloading packages

Posted Mar 16, 2019 14:25 UTC (Sat) by ms (subscriber, #41272) [Link]

No problem. Glad I could help!

Federated blogging with WriteFreely

Posted Mar 17, 2019 4:32 UTC (Sun) by karim (subscriber, #114) [Link]

I have to admit that I stopped reading at "Affero".

Federated blogging with WriteFreely

Posted Mar 17, 2019 5:06 UTC (Sun) by songmaster (subscriber, #1748) [Link] (2 responses)

Jon, as a long-time follower of your posts on G+ I hope you will continue to post such ramblings. I just subscribed to the RSS feed you posted above, the output from WriteFreely looks good in Feedly.

I have been following several other kernel dev’s on G+ too, it would be nice to know where they’re going if anywhere — Linus, Alan Cox, etc.

Federated blogging with WriteFreely

Posted Mar 17, 2019 12:28 UTC (Sun) by madscientist (subscriber, #16861) [Link]

Me too. Maybe worth a LWN article (once things settle down).

Federated blogging with WriteFreely

Posted Mar 18, 2019 20:47 UTC (Mon) by cdarroch (subscriber, #26812) [Link]

Indeed, and there's at least one reference in the Linux kernel source to a lengthy Google+ comment thread on one of Linus's posts there, regarding the magic behind the implementation of the 32-bit and 64-bit variants of the count_masked_bytes() function used in the little-endian implementation of find_zero(), which is called, I believe, when hashing and comparing dentry names while walking file paths.

One hopes this and similar historical conversations on Google+ can be preserved somewhere for posterity, with the comments intact. My quick glance through the Internet Archive snapshot of the thread mentioned above suggests the archive copy lacks most of the 124 comments, where the meat of the discussion took place, but I may be mistaken (and I certainly hope so!)

Federated blogging with WriteFreely

Posted Mar 17, 2019 12:32 UTC (Sun) by Yorhel (subscriber, #91403) [Link] (4 responses)

So I'm trying to follow @corbet@kernelpage.com from Mastodon, but I'm not sure how to go about doing that. Normally pasting an address into the search field does the trick, but it's not showing any results now. Has anyone succeeded at it yet?

Federated blogging with WriteFreely

Posted Mar 20, 2019 9:37 UTC (Wed) by alex (subscriber, #1355) [Link] (3 responses)

I suspect there is something else that needs setting up for it. It seems to be a feature of the hosted accounts but I assume there is a knob somewhere you can tweak.

Federated blogging with WriteFreely

Posted Mar 24, 2019 22:06 UTC (Sun) by thebaer (guest, #130968) [Link] (2 responses)

(WriteFreely developer here) It looks like a configuration issue -- the /.well-known/ path isn't accessible to the world. Particularly, Mastodon needs the webfinger route in order to discover the blog -- it's going to hit this URL when looking up the blog: https://kernelpage.com/.well-known/webfinger?resource=acc...

webfinger

Posted Mar 25, 2019 22:49 UTC (Mon) by corbet (editor, #1) [Link] (1 responses)

FWIW I believe I have fixed this; I'd be curious to hear if things work for people now.

webfinger

Posted Mar 25, 2019 23:31 UTC (Mon) by thebaer (guest, #130968) [Link]

Yep, just followed 👍 (should show up on your stats page), and I can find your existing posts when searching for their URLs in Mastodon.

By the way, would love to know more about what caused the misconfiguration if you don't mind sharing, either in our fledgling documentation repo or our forum. That would help others potentially fix similar issues in the future.

Federated blogging with WriteFreely

Posted Mar 18, 2019 8:05 UTC (Mon) by elboulangero (subscriber, #81193) [Link]

If you're interested in having a web user interface that allows you to write your posts in a web browser (which is apparently what WriteFreely offers), then there is also Ghost to consider. I used it for a while for a small personal blog, I found it quite good. Maybe this article can give you a quick insight in the project: https://blog.ghost.org/5/

In the end, I found it overkill for my needs, and I prefer the workflow offered by static sites generator (ie. terminal+editor+git). So I switched to Pelican and I'm super happy with it, I give it a 5 stars.


Copyright © 2019, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds