From 08b56d6afbf76a43ba40c8b9225cdd36c458cf92 Mon Sep 17 00:00:00 2001 From: Matt Kosarek Date: Wed, 18 Feb 2026 17:17:07 -0500 Subject: Do not commit public/posts --- .gitignore | 1 + _posts/sitemap.org | 2 +- public/posts/dec_29_2025.html | 125 ------- public/posts/feed.xml | 50 --- public/posts/hello.html | 774 ----------------------------------------- public/posts/jul_28_2025.html | 58 --- public/posts/june_08_2025.html | 70 ---- public/posts/may_06_2025.html | 58 --- public/posts/post.css | 82 ----- public/posts/sitemap.css | 130 ------- public/posts/sitemap.html | 112 ------ 11 files changed, 2 insertions(+), 1460 deletions(-) delete mode 100644 public/posts/dec_29_2025.html delete mode 100644 public/posts/feed.xml delete mode 100644 public/posts/hello.html delete mode 100644 public/posts/jul_28_2025.html delete mode 100644 public/posts/june_08_2025.html delete mode 100644 public/posts/may_06_2025.html delete mode 100644 public/posts/post.css delete mode 100644 public/posts/sitemap.css delete mode 100644 public/posts/sitemap.html diff --git a/.gitignore b/.gitignore index bdd8f6f..5499304 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ themes/dist .packages public/themes +public/posts diff --git a/_posts/sitemap.org b/_posts/sitemap.org index 3ea35fd..cd3daee 100644 --- a/_posts/sitemap.org +++ b/_posts/sitemap.org @@ -1,6 +1,6 @@ #+TITLE: -#+DATE: 2026-02-18 at 17:14 +#+DATE: 2026-02-18 at 17:15 #+HTML_LINK_HOME: / diff --git a/public/posts/dec_29_2025.html b/public/posts/dec_29_2025.html deleted file mode 100644 index 48981c7..0000000 --- a/public/posts/dec_29_2025.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -Update December 29, 2025 - - - - - - - -
- -
- -
-

Update December 29, 2025

- RSS Feed -
-
-
-
-

What have I been up to?

-
-

-2025 has been one busy year for me! I feel as though I've been working on a dozen things at once and have spent much of my working (and personal) days productively. Miracle finally feels like it's getting somewhere fast, the Flutter multi-window work is landing at a solid pace, and Mir is feeling like a truly solid option for Wayland compositor development. I will refrain from speaking too much on the Flutter and Mir work in this post, as those are best left in the hands of Canonical. -

-
-
-
-

Miracle Update

-
-

-Miracle has come a long way this past year. I now feel entirely confident using it as my daily driver, minus a few hiccups that I encounter in-between releases. A lot of great things are cooking for 2026 too, -

- -

-One of the major upcoming features in Miracle is a plugin system. Having a plugin system in Miracle will empower 3rd party authors to extend the compositor in ways that I haven't currently imagined while also providing me with the flexibility to iterate quickly on designs. Many compositors already have plugin systems. For example, GNOME does this via JavaScript and Hyprland does this by dynamically loading shared libraries at runtime (note: this is my understanding as of writing this). Both of these solutions are reasonable, but they come with a few downsides. -

- -

-The "true" scripting language solution comes with the overhead of shipping a complicated interpreter inside of the compositor. In addition to this, plugin developers are forced to use a particular language, perhaps one that they are unfamiliar with. While you get increased programming flexibility from using a scripting language, you have to balance this with the introduced complexity of that language. -

- -

-The shared library approach also has its downsides. While dynamically loading a shared library at runtime is lightweight, it prevents users of the compositor from safely running plugins unless they first trust the plugin author. The shared library will be running inside of the same process as your very priveleged compositor. This increases the attack surface to an extent that I would feel uncomfortable shipping to users. -

- -

-For these reasons, I decided that Miracle plugins will be written in WebAssembly with the help of WasmEdge. The benefits of this approach are: -

- -
    -
  1. WebAssembly runs in a lightweight bytecode engine
  2. -
  3. Many languages can compile down to WebAssembly (Rust will have first-class support to start)
  4. -
  5. WebAssembly plugins will only be able to access APIs that we provide (reducing the requirement of "trusting" the plugin author)
  6. -
- -

-The WebAssembly modules will implement certain functions by signature. Miracle will search for a particular signature in the module. If that signature is found, Miracle will delegate the function call defined by that signature to the WebAssembly module instead of Miracle's internal implementation. In this way, the WASM plugin will only have the data that it needs to perform an action. It is perfectly isolated from the rest of the process while also running quickly in the bytecode engine. Here is an example of an animation plugin that will linearlly fade in a window: -

- -
-
#[unsafe(no_mangle)]
-pub extern "C" fn animate(
-    data: MiracleAnimationFrameData,
-) -> MiracleAnimationFrameResult {
-
-    let progress = data.runtime_seconds / data.duration_seconds;
-    let opacity = data.opacity_start + (data.opacity_end - data.opacity_start) * progress;
-    MiracleAnimationFrameResult {
-        completed: 0,
-        has_area: 1,
-        area: [data.destination[0], data.destination[1], data.destination[2], data.destination[3]],
-        has_transform: 0,
-        transform: [0.0; 16],
-        has_opacity: 1,
-        opacity,
-    }
-} 
-
-
- -

-While this is still in a prototype phase, the types defined here will be provided by a Rust crate in the future. The system should be very easy to use from Rust. -

- -

-In parallel with this work, I have been working on improving the shell authoring experience in Miracle. The beginning of this has been the initial implementation of a background on floating containers, but work is proceeding to things like built-in context menus, workspace overview modes, and much more. The idea is to have simple, built-in versions for many shell components while allowing users to provide their own custom clients for each shell element. To this end, I have been working on miracle.dart, which is a Dart API that should enable users to easily interact with Miracle in Flutter and provide Flutter apps as shell elements. This API is still in early stages, however. -

- -

-At the same time, I have been working on improving the floating window management in Miracle. Miracle should be a competent floating window manager for those who need it. -

- -

-v0.9.0 of Miracle will probably be a long time in the making. My estimate is that early spring will see it released. However, it should be the penultimate release before I am ready to make v1.0.0 the first, official stable release. And who knows - maybe we'll even have a shell to go along with it! -

-
-
-
-

Conclusion

-
-

-2025 has been a whirlwind of a year, and I'm sure that 2026 won't slow down at all for me. A lot of the long term projects that I've been working on are finally coming together, and I feel as though I am on the cusp of making software that I'm truly proud of. On top of that, I am engaged! What a time to be alive :) I hope you all have a lovely New Year with your friends, family, cats, dogs, and everything else. -

- -

-Keep on making great stuff ✌️ -

-
-
-
- - diff --git a/public/posts/feed.xml b/public/posts/feed.xml deleted file mode 100644 index d1388a0..0000000 --- a/public/posts/feed.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - Matthew's Blog - https://matthewkosarek.xyz/ - The RSS feed for Matthew Kosarek's Blog - en-us - Wed, 18 February 2026 17:14:00 -0400 - - - Update December 29, 2025 - https://matthewkosarek.xyz/posts/dec_29_2025.html - https://matthewkosarek.xyz/posts/dec_29_2025.html - Mon, 29 December 2025 10:27:00 -0400 - Update December 29, 2025 - - - - Update July 28, 2025 - https://matthewkosarek.xyz/posts/jul_28_2025.html - https://matthewkosarek.xyz/posts/jul_28_2025.html - Mon, 28 July 2025 17:30:00 -0400 - Update July 28, 2025 - - - - Update June 08, 2025 - https://matthewkosarek.xyz/posts/june_08_2025.html - https://matthewkosarek.xyz/posts/june_08_2025.html - Sun, 08 June 2025 15:30:00 -0400 - Update June 08, 2025 - - - - Update May 06, 2025 - https://matthewkosarek.xyz/posts/may_06_2025.html - https://matthewkosarek.xyz/posts/may_06_2025.html - Tue, 06 May 2025 17:00:00 -0400 - Update May 06, 2025 - - - - Hello, Org - https://matthewkosarek.xyz/posts/hello.html - https://matthewkosarek.xyz/posts/hello.html - Tue, 20 Jun 2023 11:45:00 -0400 - Hello, Org - - - diff --git a/public/posts/hello.html b/public/posts/hello.html deleted file mode 100644 index 629ed69..0000000 --- a/public/posts/hello.html +++ /dev/null @@ -1,774 +0,0 @@ - - - - - - -Hello, Org - - - - - - - -
- -
- -
-

Hello, Org

- RSS Feed -
-
-
-
-

TLDR

-
-
    -
  • Create a new folder
  • -
  • Put index.css, publish.el, and publish.sh in the folder
  • -
  • Create a folder called _posts (this is where blog posts are written)
  • -
  • Create an org file in _posts, ideally with a #+DATE and #+TITLE attribute
  • -
  • Create a folder called posts (this is where blog posts are published to)
  • -
  • Put post.js and post.css inside of the posts directory
  • -
  • Run ./publish.sh to generate the blog post files
  • -
  • Run ./python -m http.server 8080 from the root folder
  • -
  • Navigate to localhost:8080/posts/sitemap.html to see your posts
  • -
-
-
-
-

Introduction

-
-

-I've recently fallen in love with org-mode, specifically when I use it with org-roam. I find the whole workflow of creating, tagging, and - later on - searching for information on my computer to be very elegant. On top of that, now that I have the time, I want to begin writing blog posts to better work out my thoughts. With both of these things in mind, I am again turning to the universal tool for human prospering: org-mode. This time, I want to see how it can help me turn a simple org file into a blog post on my website. My requirements are: -

- -
    -
  1. Org files must get published to HTML files in a particular format with a preset stylesheet
  2. -
  3. Code blocks must include code highlighting
  4. -
  5. Images must be supported
  6. -
  7. Posts must be timestamped with the creation date next to the title
  8. -
  9. A high-level "directory" page should be generated containing a list of the posts ordered chronologically with the newest at the top
  10. -
  11. Posts should have tags that can be used for filtering and search.
  12. -
- -

-And that's pretty much it for now. Without further ado, let's jump into getting this up and running. -

- -

-(Note: I will be heavily inspired by this post from System Crafters. I highly recommend that you read his post first before you follow my post, as he provides more details about the org-publish-project-alist command than I am willing to go into in this post.) -

-
-
-
-

Basic HTML File

-
-

-As a pilot, we are going to use this org file that I am currently writing (hello.org) as our guinea pig. The goal is to have this org file be our very first blog post. -

- -

-Emacs ships with org export goodies out of the box via the ox-publish.el package (which you can find here). In our case, we will want to use this package to write a script that exports all the ./_posts/*.org files and outputs them to a corresponding ./posts/*.html. Leaning heavily on the System Crafters information, we can create a file called publish.el and write the following inside of it: -

- -
-
(require 'ox-publish)
-
-(setq org-publish-project-alist
-      (list
-       (list "matthewkosarek.xyz"
-             :recursive t
-             :base-directory "./_posts"
-             :publishing-directory "./posts"
-             :publishing-function: 'org-html-publish-to-html)))
-
-(org-publish-all t)
-(message "Build Complete")
-
-
- -

-Next, in the same way that System Crafters made a shell script to execute this lisp, snippet, we can create a file called publish.sh and write the following inside of it: -

- -
-
#!/bin/sh
-emacs -Q --script publish.el
-
-
- -

-We then do a chmod +x publish.sh to make it an executable and run it with ./publish.sh. If everything went according to plan, we should see a new file at posts/hello.html. -

-
-
-
-

Disabling features that we don't want

-
-

-The next thing will be to remove some of the generated items that I didn't ask for, namely the table of contents, author, section numbers, creation time stamp, and the validation link. -

- -
-
(require 'ox-publish)
-
-(setq org-publish-project-alist
-      (list
-       (list "matthewkosarek.xyz"
-             :recursive t
-             :base-directory "./_posts"
-             :publishing-directory "./posts"
-             :publishing-function: 'org-html-publish-to-html
-             :with-toc nil        ; Disable table of contents
-             :with-author nil     ; Disable author
-             :section-numbers nil ; Disable section numbers
-             :time-stamp-file nil ; Disable timestamp
-             :with-date nil)))    ; Disable date
-
-(setq org-html-validation-link nil) ; Disable the validation link at the bottom
-
-(org-publish-all t)
-(message "Build Complete")
-
-
-
-
-
-

Styling & Code Highlighting

-
-

-Next thing on our list is custom styling. This can be achieved by first installing the htmlize package from melpa / elpa. The EmacsWiki describes this as "a package for exporting the contents of an Emacs buffer to HTML while respecting display properties such as colors, fonts, underlining, invisibility, etc" (reference). If used "out-of-the-box", the buffer will be exported to HTML with all of the styles inlined (e.g. if you underline something in your org file, you will generate a <span style="text-decoration: underline">...</span>). However, we are more interested in styling everything by ourselves: we don't want htmlize making assumptions about what underlining means to us! Luckily, htmlize gives us the option to export with class names instead of inline styles so that we can specify each style for ourselves. -

- -
-
(require 'ox-publish)
-
-;; First, we need to setup our publish.el file to hook up to melpa/elpa so that we can ensure
-;; htmlize is installed before we begin publishing.
-(require 'package)
-(setq package-user-dir (expand-file-name "./.packages"))
-(setq package-archives '(("melpa" . "https://melpa.org/packages/")
-                         ("elpa" . "https://elpa.gnu.org/packages/")))
-
-;; Initialize the package system
-(package-initialize)
-(unless package-archive-contents
-  (package-refresh-contents))
-
-;; Install dependencies
-(package-install 'htmlize)
-
-(setq org-publish-project-alist
-      (list
-       (list "matthewkosarek.xyz"
-             :recursive t
-             :base-directory "./_posts"
-             :publishing-directory "./posts"
-             :publishing-function: 'org-html-publish-to-html
-             :with-toc nil
-             :with-author nil
-             :section-numbers nil
-             :time-stamp-file nil)))
-
-(setq org-html-htmlize-output-type 'css)       ;; Output classnames in the HTML instead of inline CSS
-(setq org-html-htmlize-font-prefix "org-")     ;; Prefix all class names with "org-"
-
-(setq org-html-validation-link nil
-      org-html-head-include-scripts nil        ;; Removes any scripts that were included by default
-      org-html-head-include-default-style nil) ;; Removes any styles that were included by default
-
-(org-publish-all t)
-
-(message "Build Complete")
-
-
-
- -

-If you run publish.sh and open the HTML page now, you will see that zero styling has been applied to the page. However, if you inspect an element in your browser that you suspect should have styling (like our underlined element from before), you will see that it has a class name instead of inline styles. -

- -

-Now that our generated elements have class names, we can define the style for each relevant class name. In my case, I want to include both the index.css file that my entire website defines (you can find that here) so that there are some standard styles across the site. These standard styles include the font that should be used, the spacing around the body tag, the link styles, and other generic goodies. On top of that, we will want a custom stylesheet specifically for "post" files. In my case, I have defined the following in posts/post.css: -

- -
-
pre {
-    background-color: #FEFEFE;
-    border: 1px solid #D5D5D5;
-    border-radius: 2px;
-    padding: 1rem;
-}
-
-code {
-    font-family: "Consolas" sans-serif;
-    color: #D0372D;
-}
-
-.underline {
-    text-decoration: underline;
-}
-
-/* Taken from: https://emacs.stackexchange.com/questions/7629/the-syntax-highlight-and-indentation-of-source-code-block-in-exported-html-file */
-pre span.org-builtin                     {color:#006FE0;font-weight:bold;}
-pre span.org-string                      {color:#008000;}
-pre span.org-keyword                     {color:#0000FF;}
-pre span.org-variable-name               {color:#BA36A5;}
-pre span.org-function-name               {color:#006699;}
-pre span.org-type                        {color:#6434A3;}
-pre span.org-preprocessor                {color:#808080;font-weight:bold;}
-pre span.org-constant                    {color:#D0372D;}
-pre span.org-comment-delimiter           {color:#8D8D84;}
-pre span.org-comment                     {color:#8D8D84;font-style:italic}
-1pre span.org-outshine-level-1           {color:#8D8D84;font-style:italic}
-pre span.org-outshine-level-2            {color:#8D8D84;font-style:italic}
-pre span.org-outshine-level-3            {color:#8D8D84;font-style:italic}
-pre span.org-outshine-level-4            {color:#8D8D84;font-style:italic}
-pre span.org-outshine-level-5            {color:#8D8D84;font-style:italic}
-pre span.org-outshine-level-6            {color:#8D8D84;font-style:italic}
-pre span.org-outshine-level-7            {color:#8D8D84;font-style:italic}
-pre span.org-outshine-level-8            {color:#8D8D84;font-style:italic}
-pre span.org-outshine-level-9            {color:#8D8D84;font-style:italic}
-pre span.org-rainbow-delimiters-depth-1  {color:#707183;}
-pre span.org-rainbow-delimiters-depth-2  {color:#7388d6;}
-pre span.org-rainbow-delimiters-depth-3  {color:#909183;}
-pre span.org-rainbow-delimiters-depth-4  {color:#709870;}
-pre span.org-rainbow-delimiters-depth-5  {color:#907373;}
-pre span.org-rainbow-delimiters-depth-6  {color:#6276ba;}
-pre span.org-rainbow-delimiters-depth-7  {color:#858580;}
-pre span.org-rainbow-delimiters-depth-8  {color:#80a880;}
-pre span.org-rainbow-delimiters-depth-9  {color:#887070;}
-pre span.org-sh-quoted-exec              {color:#FF1493;}
-pre span.org-css-selector                {color:#0000FF;}
-pre span.org-css-property                {color:#00AA00;}
-
-
- -

-That CSS file should get you going with some decent code highlighting and styles, but I don't pretend that it is complete. -

- -

-Finally, we need to tell org mode to include our two CSS files when the page is loaded. To do this, we can use the HTML <link> entity. We will set the org-html-head variable to insert two link entities at the top of the page. -

- -
-
(require 'ox-publish)
-
-(require 'package)
-(setq package-user-dir (expand-file-name "./.packages"))
-(setq package-archives '(("melpa" . "https://melpa.org/packages/")
-                         ("elpa" . "https://elpa.gnu.org/packages/")))
-
-;; Initialize the package system
-(package-initialize)
-(unless package-archive-contents
-  (package-refresh-contents))
-
-;; Install dependencies
-(package-install 'htmlize)
-
-(setq org-publish-project-alist
-      (list
-       (list "matthewkosarek.xyz"
-             :recursive t
-             :base-directory "./_posts"
-             :publishing-directory "./posts"
-             :publishing-function: 'org-html-publish-to-html
-             :with-toc nil
-             :with-author nil
-             :section-numbers nil
-             :time-stamp-file nil)))
-
-(setq org-html-htmlize-output-type 'css)
-(setq org-html-htmlize-font-prefix "org-")
-
-(setq org-html-validation-link nil
-      org-html-head-include-scripts nil      
-      org-html-head-include-default-style nil
-      org-html-head "
-  <link rel=\"stylesheet\" href=\"/index.css\" />
-  <link rel=\"stylesheet\" href=\"/posts/post.css\" />
-  <link rel=\"shortcut icon\" href=\"/favicon/favicon.ico\" type=\"image/x-icon\">
-  ")                                                   ;; Include index.css and posts/post.css when the page loads
-                                                       ;; Note that I also set the "favicon" too, but this is optional
-
-(org-publish-all t)
-
-(message "Build Complete")
-
-
-
- -

-If we run the publish again, we can see that we have full styling on our code snippets and everything else on our website. -

-
-
-
-

Images

-
-

-Our first two criteria have been met! Next on the list is solving images. As an example, let's use this squirrel image that I found online with an open source license. The ideal situation would be: -

- -
    -
  1. The squirrel image lives closely to this org document (hello.org)
  2. -
  3. We can reference the image file in our org file, and see it in our HTML page as an image
  4. -
- -

-Unfortunately, it doesn't look to be that easy. Let's examine the ideal situation. Let's say we provide a relative path to an image in our org file like so: -

-
-
[[./assets/squirrel.jpg]]
-
-
- -

-If we click this link in our org buffer, the relative path will work right away. However, when we export the org file to HTML, the following tag will be generated: -

- -
-
<img src="./assets/squirrel.jpg" alt="squirrel.jpg">
-
-
- -

-The browser cannot resolve this absolute path, which results in the alternate "squirrel.jpg" text being shown next to a broken image. -

- -

-So what's the fix here? Well, we have two options, but I am going to go with the easiest. For more information, check out this stackoverflow post. The route I chose puts the onus of making a proper link on the writer of the blog post. The fix simply modifies the src attribute of the generated HTML to have an absolute path to the image, while also allowing the org file to retain a link to the image that it understands. -

- -
-
#+ATTR_HTML: :src /_posts/assets/squirrel.jpg
-[[./assets/squirrel.jpg]]
-
-
- -

-That's all there is to it! There are simpler ways as well, but that should do it: -

- -
-

squirrel.jpg -

-

Figure 1: A Cute Squirrel

-
-
-
-
-

Creation Date

-
-

-Let's add the creation date below the title next. To start, we will modify the publish command to remove the title (:with-title nil) and, in its place, show a preamble bit of HTML that contains a formatted div with the title and the "last modified" span.z -

- -
-
(setq org-publish-project-alist
-      (list
-       (list "matthewkosarek.xyz"
-             :recursive t
-             :base-directory "./_posts"
-             :publishing-directory "./posts"
-             :publishing-function: 'org-html-publish-to-html
-             :with-toc nil
-             :with-author nil
-             :section-numbers nil
-             :time-stamp-file nil
-             :with-title nil
-             :html-preamble-format '(("en" "
-  <div class=\"org-article-title\">
-    <h1>%t</h1>
-    <span>Last modified: %d</span>
-  </div>
-"))
-
-
- -

-The html-preamble-format variable takes an association list (alist) as a parameter. Each entry in the alist should have the export language (in this case english or "en") as the first value and the format for that language as the second value. -

- -

-The "%t" in the HTML string will be filled in with the title of your post. This is set by the #+TITLE: MY_TITLE attribute of your org file. In this case, that is "Hello, Org". The "%d" is used to insert the date of your post. This is set by the #+DATE: <ORG_TIMESTAMP> in your org file. You can insert a timestamp into the buffer by writing M-x org-time-stamp, or by typing one out yourself. (Hint: You can do an M-x describe-variable and type "org-html-preamble-format" to get more info on what "%X" values you can include in this format). -

- -

-On top of this, we can modify our posts/post.css file to make the title a bit more pleasing to the eyes. -

- -
-
.org-article-title > h1 {
-    margin-bottom: 0;
-}
-
-.org-article-title > span {
-    color: #707183;
-}
-
-
- -

-If you want to see the full list of which values can be included in the html-preamble-format, you can do an M-x describe-variable on the org-html-preamble-format variable. -

- -

-Note that the downside of this is that the created date will change whenever you next save the buffer. This isn't a huge deal for my purposes, but you may need to come up with a more sophisticated mechanism for the exact "creation" date for your use case. -

-
-
-
-

Generating the Directory

-
-

-For every org file in my _posts folder, I would like to create a link to the generated HTML file at the /posts.html page of my website. You can think of this as the "directory" of all posts. My criteria is: -

-
    -
  1. Posts should appear in order from newest to oldest
  2. -
  3. Posts should be searchable by tags (covered in the next section)
  4. -
  5. Posts should be searchable by title
  6. -
- -

-The "out-of-the-box" mechanism for accomplishing this is the sitemap. You can think of a sitemap as a directory of sorts. While sitemaps can grow to be infinitely deep (i.e. sitemaps referencing other sitemaps), we will keep our sitemap as a flat list containing the available posts in chronological order. -

- -

-To start, we can enable source maps for our publish like so: -

- -
-
(setq org-publish-project-alist
-      (list
-       (list "matthewkosarek.xyz"
-             :recursive t
-             :base-directory "./_posts"
-             :publishing-directory "./posts"
-             :publishing-function: 'org-html-publish-to-html
-             :with-toc nil
-             :with-author nil
-             :section-numbers nil
-             :time-stamp-file nil
-             :with-title nil
-             :html-preamble-format '(("en" "
-  <div class=\"org-article-title\">
-    <h1>%t</h1>
-    <span>Last modified: %d</span>
-  </div>
-"))
-             :auto-sitemap t                           ; Enable the sitemap
-             :sitemap-sort-files "chronologically"     ; Sort files chronologically
-             :sitemap-format-entry (lambda (entry style project) (get-org-file-title entry style project))
-             )))
-
-
- -

-If we generate again, we will find two files generated: -

-
    -
  1. _posts/sitemap.org: The org file containing the generated sitemap
  2. -
  3. posts/sitemap.html: The HTML file that was generated based on the previous sitemap.org file
  4. -
- -

-If you open the sitemap.html file in your browser, you will see a bulleted listed containing a link to "Hello, Org". Clicking on it will bring you to this blog post. -

- -

-From here, you may customize it however you like. The following are my customizations. -

-
-
-

Sitemap Title

-
-

-I changed the title to "Matthew's Blog Posts". -

- -
-
(defun get-org-file-title(entry style project)
-  (setq  timestamp (org-timestamp-format (car (org-publish-find-property entry :date project)) "%B %d, %Y"))
-  (format "%s created on %s" (org-publish-sitemap-default-entry entry style project) timestamp)
-  )
-
-(setq org-publish-project-alist
-      (list
-       (list "matthewkosarek.xyz"
-             ...
-             :sitemap-title "Matthew's Blog Posts"  ; Change the title
-             )))
-
-
-
-
-
-
-

Format blog entries in the list

-
-

-I like to include the creation date on the blog posts. To do this, we can use org-publish-find-property to find the date property of the org file. Afterward, we can format a string that includes our formatted timestamp and the org-publish-sitemap-default-entry, which is just a link with the title of the post. -

-
-
(defun get-org-file-title(entry style project)
-  (setq  timestamp (org-timestamp-format (car (org-publish-find-property entry :date project)) "%B %d, %Y"))
-  (format "%s created on %s" (org-publish-sitemap-default-entry entry style project) timestamp)
-  )
-
-(setq org-publish-project-alist
-      (list
-       (list "matthewkosarek.xyz"
-             ...
-             :sitemap-format-entry (lambda (entry style project) (get-org-file-title entry style project))
-             )))
-
-
-
-
-
-
-

Tags & Filtering

-
-

-I use Org-roam for all of my note-taking and, in the next blog post, I plan to demonstrate how I will hook up my Org-roam note-taking workflow to my blogging. In the meantime, just know that we can add tags to the top of our org files like this: -

- -
-
#+filetags: :tag_1:tag_2:
-
-
- -

-This would tag this org buffer with "tag1" and "tag2". -

- -

-Our criteria for the tag filtering system is: -

-
    -
  • A post can contain many tags
  • -
  • Users can filter my one or many tags (i.e. "home" and "technology" but not "lifestyle")
  • -
  • By default, users see all posts with all tags
  • -
  • Searching happens on the client
  • -
  • We don't have to manually maintain a list of valid tags. The list of valid tags should be dynamically loaded from the blog posts themselves.
  • -
- -

-Let's modify the get-org-file-title function that we wrote in the previous section to parse and include these tags: -

- -
-
(defun get-org-file-title(entry style project)
-  (setq timestamp (org-timestamp-format (car (org-publish-find-property entry :date project)) "%B %d, %Y"))
-  (setq tag-list (org-publish-find-property entry :filetags project))
-  (setq tag-list-str (mapconcat 'identity tag-list ","))
-  (setq result (format "%s created on %s\n#+begin_sitemap_tag\n%s\n#+end_sitemap_tag\n" (org-publish-sitemap-default-entry entry style project) timestamp tag-list-str))
-  )
-
-
- -

-We extract the "filetags" from the org file, concatenate them into a comma-delimited string, and format them into the title string. We place the contents inside of a begin_sitemap_tag and end_sitemap_tag block. In HTML, this creates an enclosing div element with the class name "sitemaptag". That means we can target the .sitemap_tag element in CSS. In our case, we want to hide all of that data entirely so we can put the following in posts/post.css: -

- -
-
.sitemap_tag {
-    display: none;
-}
-
-
- -

-If you rerun the publish.sh script now, you will see the tags only if you inspect the element, but they will not appear visually. -

- -

-Next thing is to write a small snippet of JavaScript that our page will load. This snippet is responsible for: -

-
    -
  1. Creating a list of the used tags
  2. -
  3. Creating enable/disable buttons for each tag
  4. -
  5. Hiding/showing a post depending on the state of its tags
  6. -
- -

-We create a new file called posts/post.js and put the following inside: -

- -
-
function main() {
-
-  // Gather the used set oof tags
-  const tagSet = new Set();
-  const postList = [];
-  const tagContainers = document.getElementsByClassName('sitemap_tag');
-  for (let index = 0; index < tagContainers.length; index++) {
-    const container = tagContainers[index];
-    const pContainer = container.children[0];
-    if (!pContainer) {
-      continue;
-    }
-
-    const tagList = pContainer.textContent.split(',');
-    tagList.forEach(tag => tagSet.add(tag));
-    postList.push({
-      container: container.parentElement,
-      tagList: tagList,
-      enabled: tagList.length
-    });
-  }
-
-  // Create the tag container
-  const contentContainer = document.getElementById('content');
-  const tagContainer = document.createElement('div');
-  tagContainer.id = 'tag-filter-container';
-  contentContainer.before(tagContainer);
-
-  let numEnabled = tagSet.size;
-  for (const tag of tagSet) {
-    const tagElement = document.createElement('div');
-    tagElement.className = "tag-filter-item";
-    const tagElementLabel = document.createElement('span');
-    tagElementLabel.innerHTML = tag;
-    const tagElementButton = document.createElement('button');
-    tagElement.append(tagElementLabel, tagElementButton);
-    tagContainer.append(tagElement);
-
-
-    // Whenever a tag is clicked, execute the filtering behavior
-    tagElementButton.onclick = function() {
-      // Handle enable/disable
-      tagElement.remove();
-
-      if (tagElement.classList.contains('disabled')) {
-        tagElement.classList.remove('disabled');
-        if (numEnabled === 0) {
-          tagContainer.prepend(tagElement);
-        }
-        else {
-          tagContainer.children[numEnabled - 1].after(tagElement);
-        }
-        numEnabled++;
-
-        // Filter
-        postList.forEach(post => {
-          if (post.tagList.includes(tag)) {
-            post.enabled++;
-
-            if (post.enabled) {
-              post.container.style.display = 'list-item';
-            }
-          }
-        });
-      }
-      else {
-        tagElement.classList.add('disabled');
-        tagContainer.append(tagElement);
-        numEnabled--;
-
-        // Filter
-        postList.forEach(post => {
-          if (post.tagList.includes(tag)) {
-            post.enabled--;
-            if (!post.enabled) {
-              post.container.style.display = 'none';
-            }
-          }
-        });
-      }
-    };
-  }
-}
-
-window.onload = main;
-
-
- -

-Next, we modify the org-html-head to include <script src='/posts/post.js'></script> so that this script is loaded on every blog post page. -

- -

-Finally, let's append the following to posts/posts.css so that our tag list is pretty: -

- -
-
#tag-filter-container {
-    display: flex;
-    flex-direction: row;
-    column-gap: 8px;
-    margin-top: 1rem;
-}
-
-.tag-filter-item {
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-    padding: 0.25rem 0.5rem;
-    border: 1px solid black;
-    border-radius: 3px;
-    justify-content: center;
-    column-gap: 1rem;
-    background-color: #fffed8;
-}
-
-.tag-filter-item button {
-    background: none;
-    border: none;
-    outline: none;
-    margin: 0;
-    padding: 0;
-    color: red;
-    font-size: 1.5rem;
-}
-
-.tag-filter-item button:before {
-    content: '\00d7';
-}
-
-.tag-filter-item.disabled button:before {
-    content: '+';
-}
-
-.tag-filter-item.disabled {
-    background-color: #f2f2f2;
-    color: gray;
-    border-color: gray;
-}
-
-.tag-filter-item.disabled button {
-    color: green;
-}
-
-.tag-filter-item button:hover {
-    cursor: pointer;
-    opacity: 0.8;
-}
-
-
-
-
-
-

Conclusion

-
-

-There are many more customizations that I plan to do on this system in the future, but I plan to leave this for now so that I can actually get to some blogging. I will proofread and fix my mistakes as time goes on, but this should be a good jumping off point for anyone interested in using org for their own blogging system. -

-
-
-
- - diff --git a/public/posts/jul_28_2025.html b/public/posts/jul_28_2025.html deleted file mode 100644 index d93cf72..0000000 --- a/public/posts/jul_28_2025.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - -Update July 28, 2025 - - - - - - - -
- -
- -
-

Update July 28, 2025

- RSS Feed -
-
-
-
-

What have I been up to?

-
-

-Whoops! I missed this month's update by a long shot, but I still want to get it out there before the end of the month. -

- -

-This month was busy busy. I released v0.6.0 of miracle-wm which adds a bunch of new features, go and check it out if you haven't already! I am nearly finished with the sway/i3 IPC support and have big plans to wrap that up before the middle of August. There really isn't much more to go on that front so I might as well close that chapter. On top of that, the more interesting features of miracle that I have planned (e.g. some built-in shell integrations) are motivating me to wrap up the boring parts first. -

- -

-Aside from miracle, I've continued to land a bunch of things in Mir recently around accessibility. The magnifier work is finally done, so go check that out if you use that feature in your day-to-day! I also did a ton of work to fix screenshooting on rotated displays. We were ignoring wlsurface::setbuffertransform in a big way. Now that we're not doing that, your screenshots should like perfect every time! -

- -

-Last but not least, the team has been making waves implementing multi-window in the Flutter toolkit. That's some really interesting and exciting work, so stay tuned for that if you're a Flutter developer! -

- -

-That's all I got! I will make another post shortly, maybe once miracle v0.7.0 is out. Have a great rest of your summer/winter πŸͺ -

-
-
-
- - diff --git a/public/posts/june_08_2025.html b/public/posts/june_08_2025.html deleted file mode 100644 index f467a84..0000000 --- a/public/posts/june_08_2025.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - -Update June 08, 2025 - - - - - - - -
- -
- -
-

Update June 08, 2025

- RSS Feed -
-
-
-
-

What have I been up to?

-
-

-Another month has gone by, so I guess it's time to see what I've been up to. -

- -

-Canonical hosted our company's sprint in Frankfurt, Germany during the month of May. It was a very productive time for the whole team. I always enjoy seeing everyone in person, talking through big issues face-to-face, and exploring a new city. I also got to spend some time in Zurich, Switzerland before the sprint began. Zurich is pretty awesome πŸ”οΈ! -

- -

-In miracle-wm, I have been going down quite the rabbit-holeπŸ‡! What began as a plan to fix the remaining warnings in the source code has snowballed into me implemnenting the rest of the IPC mechanism and testing the entire thing. This has been no small feat, as both sway and i3 implement a lot of different commands, and a failure to implement any one of them often leads to half-broken clients. I've had to make some "executive" decisions to ignore parts of the protocol that I deem irrelevant now (especially many of the X-specific bits), but it is a mostly compatible implementation. The good news is that I've nearly completed this journey and should be ready to release version 0.6.0 some time in the middle of June. -

- -

-Miracle is getting closer-and-closer to my vision of it every day. The only problem right now is finding the bandwidth to implement everything that I have in my head :) -

- -

-On the Mir side of things, I am still implementing the magnifier glass accessibility feature from before, but with a much-improved technical direction that we arrived at during our time in Frankfurt. Unfortunately, this required a quick detour to properly implement the overlay_cursor flag of zwlrscreencopymanagerv1::captureoutputregion, as both screencopy and magnification rely on this same code path. The good news is that I'm quite close on this and it should be landing in full any day now 🀞 -

- -

-I also fixed this very breaking bug that was actively preventing miracle from rendering on my second monitor, so that's good. -

- -

-On addition to these two projects, I am also reinvolving myself in the Flutter multi-window work. For those who don't know, we're trying to make it so that the Flutter toolkit can render to multiple surfaces. This is no small feat, as Flutter was originally written with the assumption that only a single "view" would ever be drawn too. However we've managed to make some great progress on it thus far, and we're very excited to land the first pull request imminently with the help of the folks over a Google! -

- -

-I hope you're having a great and productive summer 😎 -

-
-
-
- - diff --git a/public/posts/may_06_2025.html b/public/posts/may_06_2025.html deleted file mode 100644 index 563bcab..0000000 --- a/public/posts/may_06_2025.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - -Update May 06, 2025 - - - - - - - -
- -
- -
-

Update May 06, 2025

- RSS Feed -
-
-
-
-

What have I been up to?

-
-

-I've been meaning to do these little blog-post type updates for a while, and I figured now is as good a time as any. So let's start :) -

- -

-In the world of miracle-wm, I've been hard at work writing a new settings application for the compositor called miracle-settings. While the application is written in Flutter, the logic behind the application is entirely implemented in libmiracle-wm-config.so, a new library that will ship with miracle as part of v0.6.0. If Flutter isn't your cup of tea, you should be able to implement your own settings app for miracle in the language/toolkit of your choice by simply binding to the C (or C++!) API. -

- -

-I also implemented wlr-output-management in miracle and changed how we do display configuration in a big way. The display configuration will now always be loaded from $HOME/.config/miracle-wm/display.yaml. Users should now be able to use apps like wdisplays to change the output configuration at runtime, which is pretty cool! -

- -

-On the Mir project, I've been working on accessibility features (e.g. magnification) in addition to exposing some facilities for compositor authors to write end-to-end tests for Mir-based compositors. These new testing facilities should help us write tests in miracle in a big way. -

- -

-Also - my cat who ate a sewing needle last year has turned two! 🐱 -

-
-
-
- - diff --git a/public/posts/post.css b/public/posts/post.css deleted file mode 100644 index cadc228..0000000 --- a/public/posts/post.css +++ /dev/null @@ -1,82 +0,0 @@ -pre { - background-color: #FEFEFE; - border: 1px solid #D5D5D5; - border-radius: 2px; - padding: 1rem; - overflow: auto; -} - -code { - font-family: "Consolas" sans-serif; - color: #D0372D; -} - -.underline { - text-decoration: underline; -} - -.org-article-title { - display: flex; - flex-direction: row; - justify-content: space-between; -} - -.org-article-title h1 { - margin: 0; - font-family: "Dancing Script", cursive; -} - - -/* Taken from: https://emacs.stackexchange.com/questions/7629/the-syntax-highlight-and-indentation-of-source-code-block-in-exported-html-file */ -pre span.org-builtin {color:#006FE0;font-weight:bold;} -pre span.org-string {color:#008000;} -pre span.org-keyword {color:#0000FF;} -pre span.org-variable-name {color:#BA36A5;} -pre span.org-function-name {color:#006699;} -pre span.org-type {color:#6434A3;} -pre span.org-preprocessor {color:#808080;font-weight:bold;} -pre span.org-constant {color:#D0372D;} -pre span.org-comment-delimiter {color:#8D8D84;} -pre span.org-comment {color:#8D8D84;font-style:italic} -pre span.org-outshine-level-1 {color:#8D8D84;font-style:italic} -pre span.org-outshine-level-2 {color:#8D8D84;font-style:italic} -pre span.org-outshine-level-3 {color:#8D8D84;font-style:italic} -pre span.org-outshine-level-4 {color:#8D8D84;font-style:italic} -pre span.org-outshine-level-5 {color:#8D8D84;font-style:italic} -pre span.org-outshine-level-6 {color:#8D8D84;font-style:italic} -pre span.org-outshine-level-7 {color:#8D8D84;font-style:italic} -pre span.org-outshine-level-8 {color:#8D8D84;font-style:italic} -pre span.org-outshine-level-9 {color:#8D8D84;font-style:italic} -pre span.org-rainbow-delimiters-depth-1 {color:#707183;} -pre span.org-rainbow-delimiters-depth-2 {color:#7388d6;} -pre span.org-rainbow-delimiters-depth-3 {color:#909183;} -pre span.org-rainbow-delimiters-depth-4 {color:#709870;} -pre span.org-rainbow-delimiters-depth-5 {color:#907373;} -pre span.org-rainbow-delimiters-depth-6 {color:#6276ba;} -pre span.org-rainbow-delimiters-depth-7 {color:#858580;} -pre span.org-rainbow-delimiters-depth-8 {color:#80a880;} -pre span.org-rainbow-delimiters-depth-9 {color:#887070;} -pre span.org-sh-quoted-exec {color:#FF1493;} -pre span.org-css-selector {color:#0000FF;} -pre span.org-css-property {color:#00AA00;} - -#content { - padding-bottom: 10vh; -} - -.figure p { - text-align: center; -} - -.org-article-title > h1 { - margin-bottom: 0; -} - -.org-article-title > span { - color: #707183; -} - -#org-div-home-and-up { - display: flex; - column-gap: 8px; -} diff --git a/public/posts/sitemap.css b/public/posts/sitemap.css deleted file mode 100644 index 0bd4125..0000000 --- a/public/posts/sitemap.css +++ /dev/null @@ -1,130 +0,0 @@ -.sitemap_tags { - display: flex; - flex-direction: row; - gap: 0.5rem; - align-items: center; - margin-left: auto; -} - -.sitemap_tag { - padding: 0.25rem 0.75rem; - background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); - color: #1976d2; - border-radius: 4px; - font-size: 0.7rem; - font-weight: 500; - border: 1px solid #90caf9; -} - -.sitemap_tag p { - margin: 0; - display: flex; - align-items: center; - flex-wrap: wrap; - gap: 0.5rem; - font-size: 0.75rem; -} - -.org-ul { - list-style: none; - padding: 0; -} - -.org-ul > li { - display: flex; - flex-direction: row; - align-items: center; - gap: 0.25rem; - position: relative; - margin-bottom: 0.25rem; -} - -.org-ul > li > p { - margin: 0; - font-size: 0.5rem; -} - -.org-ul > li > p > a { - color: #0066cc; - text-decoration: none; - font-weight: 600; - font-size: 1rem; -} - -.org-ul > li > p > a:hover { - text-decoration: underline; - color: #004499; -} - -.org-ul > li > p > a:after { - text-decoration: underline; - color: #004499; -} - -.org-article-title { - width: 100%; - text-align: right; -} - -#tag-filter-container { - display: flex; - flex-direction: row; - flex-wrap: wrap; - gap: 0.75rem; -} - -.tag-filter-item { - display: flex; - flex-direction: row; - align-items: center; - padding: 0.35rem; - border-radius: 2px; - justify-content: center; - font-style: italic; - background: linear-gradient(135deg, purple 0%, darkviolet 100%); - color: white; - font-size: 0.75rem; - letter-spacing: 0.3px; - transition: all 0.3s ease; -} - -.tag-filter-item:hover { - background: linear-gradient(135deg, gray 0%, darkviolet 100%); - cursor: pointer; -} - -.tag-filter-item.disabled { - background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%); - color: #666; - border-color: #999; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); - opacity: 0.7; -} - -.tag-filter-item.disabled:hover { - opacity: 1; - box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); -} - -.post-date { - position: absolute; - bottom: 0.75rem; - right: 1rem; - font-size: 0.75rem; - color: #666; - font-style: italic; -} - -.sitemap_date { - font-size: 0.8rem; - color: #666; - font-style: italic; -} - -.sitemap_date p { - margin: 0; -} - -.sitemap_date p::before { - content: 'created on '; -} diff --git a/public/posts/sitemap.html b/public/posts/sitemap.html deleted file mode 100644 index 9bcfbaf..0000000 --- a/public/posts/sitemap.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - -
- -
- -
-

- RSS Feed -
-
-
- -
- - -- cgit v1.2.1