<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>tips &amp;mdash; binarycat</title>
    <link>https://paper.wf/binarycat/tag:tips</link>
    <description>blog about programming and general tech stuff</description>
    <pubDate>Thu, 07 May 2026 09:58:22 +0000</pubDate>
    <item>
      <title>WriteFreely Draft Blogs</title>
      <link>https://paper.wf/binarycat/writefreely-draft-blogs</link>
      <description>&lt;![CDATA[One simple trick to fix the worst part of the platform.&#xA;!--more--&#xA;WriteFreely has a built in &#34;drafts&#34; feature (write.as calls them &#34;anonymous posts&#34;), but there&#39;s several problems with it:&#xA;when you save a draft and go to the &#34;preview&#34;, it will not use your custom css&#xA;hashtags are inert when used on drafts, which means there&#39;s no way to organize your drafts&#xA;the preview logic is different, so if you use !--more-- to display a &#34;read more&#34; banner, you won&#39;t be able to preview how that looks&#xA;if anyone gains access to the draft url, they can read and share that draft without your permission (this includes webscrapers for search indexes)&#xA;you cannot edit the &#34;slug&#34; of a post while it is a draft&#xA;&#xA;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.&#xA;&#xA;These blogs are only viewable by you, and only when you&#39;re logged in.  As long as your instance allows you to create multiple blogs, you can create a myblog-drafts blog, go to &#34;customize&#34;, select &#34;Private&#34;, then &#34;Save changes&#34;.  After this is done, you can go to you &#34;Drafts&#34; 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 &#34;published&#34; to your draft blog via the dropdown menu in the editor.&#xA;&#xA;Syncing custom css between your main and draft blog&#xA;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.&#xA;&#xA;Here&#39;s one way to do this using codeberg pages:&#xA;&#xA;create a new repo, let&#39;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&#39;t have to be the default branch, but it will make things easier.).&#xA;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.&#xA;replace the custom css for both blogs with @import url(&#34;https://myusername.codeberg.page/blog-css/style.css&#34;);.  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.&#xA;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.&#xA;&#xA;------&#xA;#writefreely #tips #guide&#xA;&#xA;--------&#xD;&#xA;&#xD;&#xA;You can follow this blog via its RSS feed or by searching for @binarycat@paper.wf on your Mastodon/ActivityPub instance.]]&gt;</description>
      <content:encoded><![CDATA[<p>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&#39;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&#39;s no way to organize your drafts
3. the preview logic is different, so if you use <code>&lt;!--more--&gt;</code> to display a “read more” banner, you won&#39;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</p>

<p>Luckily, WriteFreely also has another feature: private blogs.  Private blogs do not suffer <del>any</del> <em>most</em> (update: <a href="https://github.com/writefreely/writefreely/issues/1132" rel="nofollow">this software is a janky mess</a>) of the above problems.</p>

<p>These blogs are <em>only</em> viewable by you, and only when you&#39;re logged in.  As long as your instance allows you to create multiple blogs, you can create a <code>myblog-drafts</code> 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.</p>

<h2 id="syncing-custom-css-between-your-main-and-draft-blog" id="syncing-custom-css-between-your-main-and-draft-blog">Syncing custom css between your main and draft blog</h2>

<p>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 <code>@import</code>.</p>

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

<hr>

<p><a href="/binarycat/tag:writefreely" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">writefreely</span></a> <a href="/binarycat/tag:tips" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">tips</span></a> <a href="/binarycat/tag:guide" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">guide</span></a></p>

<hr>

<p>You can follow this blog <a href="https://paper.wf/binarycat/feed/" rel="nofollow">via its RSS feed</a> or by searching for <a href="https://paper.wf/@/binarycat@paper.wf" class="u-url mention" rel="nofollow">@<span>binarycat@paper.wf</span></a> on your Mastodon/ActivityPub instance.</p>
]]></content:encoded>
      <guid>https://paper.wf/binarycat/writefreely-draft-blogs</guid>
      <pubDate>Sat, 26 Oct 2024 16:38:00 +0000</pubDate>
    </item>
    <item>
      <title>Bookmark Keywords</title>
      <link>https://paper.wf/binarycat/bookmark-keywords</link>
      <description>&lt;![CDATA[Firefox&#39;s best-kept secret feature.&#xA;&#xA;When you bookmark a page, firefox opens an editor with the following options:&#xA;Name&#xA;Location&#xA;Tags&#xA;&#xA;But there&#39;s actually a secret fourth field...&#xA;!--more--&#xA;&#xA;The Other &#34;Edit Bookmark&#34; menu&#xA;there are two ways of editing a bookmark:&#xA;going to the bookmarked page and clicking the star icon (this is the same menu that shows up when you first create a bookmark)&#xA;the &#34;Edit Bookmark...&#34; context menu option (this has the same fields as the &#34;Manage Bookmarks&#34; view)&#xA;&#xA;turns out, there&#39;s actually some fields that are exclusive to one or the other&#xA;&#xA;Location&#xA;Turns out, this is only shows up in the first menu, I guess because you&#39;re expected to drag and drop bookmarks to move them around otherwise&#xA;&#xA;Confusingly, in the &#34;Manage Bookmarks&#34; view, the URL column is labeled as &#34;Location&#34;.&#xA;&#xA;URL&#xA;Only available in the second menu, allows you to change the specific page that is bookmarked.&#xA;&#xA;Keyword&#xA;This is the exciting one, and its hidden behind the second menu.&#xA;&#xA;If you give a bookmark a keyword, you can navigate to the bookmarked page just by typing that keyword into the navigation bar and hitting enter.&#xA;&#xA;This is useful if you have certain pages you access very often, especially if they are not at the domain root.  For example, I have &#34;ns&#34; set to link to The Nightly Rust Standard Library Documentation, which is otherwise annoyingly requires typing out the domain name, and two path elements. &#xA;&#xA;-----&#xA;&#xA;#firefox #tips&#xA;&#xA;--------&#xD;&#xA;&#xD;&#xA;You can follow this blog via its RSS feed or by searching for @binarycat@paper.wf on your Mastodon/ActivityPub instance.]]&gt;</description>
      <content:encoded><![CDATA[<p>Firefox&#39;s best-kept secret feature.</p>

<p>When you bookmark a page, firefox opens an editor with the following options:
* Name
* Location
* Tags</p>

<p>But there&#39;s actually a secret fourth field...
</p>

<h1 id="the-other-edit-bookmark-menu" id="the-other-edit-bookmark-menu">The Other “Edit Bookmark” menu</h1>

<p>there are two ways of editing a bookmark:
1. going to the bookmarked page and clicking the star icon (this is the same menu that shows up when you first create a bookmark)
2. the “Edit Bookmark...” context menu option (this has the same fields as the “Manage Bookmarks” view)</p>

<p>turns out, there&#39;s actually some fields that are exclusive to one or the other</p>

<h2 id="location" id="location">Location</h2>

<p>Turns out, this is only shows up in the first menu, I guess because you&#39;re expected to drag and drop bookmarks to move them around otherwise</p>

<p>Confusingly, in the “Manage Bookmarks” view, the URL column is labeled as “Location”.</p>

<h2 id="url" id="url">URL</h2>

<p>Only available in the second menu, allows you to change the specific page that is bookmarked.</p>

<h2 id="keyword" id="keyword">Keyword</h2>

<p>This is the exciting one, and its hidden behind the second menu.</p>

<p>If you give a bookmark a keyword, you can navigate to the bookmarked page just by typing that keyword into the navigation bar and hitting enter.</p>

<p>This is useful if you have certain pages you access very often, especially if they are not at the domain root.  For example, I have “ns” set to link to <a href="https://doc.rust-lang.org/nightly/std/" rel="nofollow">The Nightly Rust Standard Library Documentation</a>, which is otherwise annoyingly requires typing out the domain name, and two path elements.</p>

<hr>

<p><a href="/binarycat/tag:firefox" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">firefox</span></a> <a href="/binarycat/tag:tips" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">tips</span></a></p>

<hr>

<p>You can follow this blog <a href="https://paper.wf/binarycat/feed/" rel="nofollow">via its RSS feed</a> or by searching for <a href="https://paper.wf/@/binarycat@paper.wf" class="u-url mention" rel="nofollow">@<span>binarycat@paper.wf</span></a> on your Mastodon/ActivityPub instance.</p>
]]></content:encoded>
      <guid>https://paper.wf/binarycat/bookmark-keywords</guid>
      <pubDate>Thu, 24 Oct 2024 15:12:03 +0000</pubDate>
    </item>
  </channel>
</rss>