WriteFreely Draft Blogs

One simple trick to fix the worst part of the platform.

WriteFreely has a built in “drafts” feature (write.as calls them “anonymous posts”), but there's several problems with it: 1. when you save a draft and go to the “preview”, it will not use your custom css 2. hashtags are inert when used on drafts, which means there's no way to organize your drafts 3. the preview logic is different, so if you use <!--more--> to display a “read more” banner, you won't be able to preview how that looks 4. if anyone gains access to the draft url, they can read and share that draft without your permission (this includes webscrapers for search indexes) 5. you cannot edit the “slug” of a post while it is a draft

Luckily, WriteFreely also has another feature: private blogs. Private blogs do not suffer any most (update: this software is a janky mess) of the above problems.

These blogs are only viewable by you, and only when you're logged in. As long as your instance allows you to create multiple blogs, you can create a myblog-drafts blog, go to “customize”, select “Private”, then “Save changes”. After this is done, you can go to you “Drafts” page and move all of your drafts to your draft blog (unfortunately this has to be done one by one). Any new drafts should be “published” to your draft blog via the dropdown menu in the editor.

Syncing custom css between your main and draft blog

The simplest solution is to just periodically copy/paste the css from your main blog to your draft blog, but if you want a permanent solution, you can host the stylesheet externally and and use css @import.

Here's one way to do this using codeberg pages:

  1. create a new repo, let's call it codeberg.org/myusername/blog-css (you can use any name you want, just make sure to adjust the following steps accordingly). set the default branch name to pages (technically it doesn't have to be the default branch, but it will make things easier.).
  2. either via a local clone or the web ui, create two files in this repo: index.html, which can contain anything but must exist for codeberg pages to activate, and style.css, which contains the custom css for your blog.
  3. replace the custom css for both blogs with @import url("https://myusername.codeberg.page/blog-css/style.css");. you need to use the codeberg pages url, and not the raw url, otherwise codeberg will serve the file as text/plain instead of text/css.
  4. save your changes and reload the blogs, they should now be using the same stylesheet. any future changes to the pages branch will show up on both blogs.

#writefreely #tips #guide