What is Squarkdown?
See What is Squarkdown?.
What is Squarkdown-flavoured Markdown?
See Squarkdown-flavoured Markdown.
Can I use Squarkdown for my project?
See Project Requirements.
Why does Squarkdown only work with SvelteKit and MDsveX?
Yeah so, Squarkdown was made for a very particular purpose in a very particular tech stack. It’s totally geared towards my use cases, since I made it primarily for myself :P
It’s happened to be perfect for many of my projects, including pyco:bytes, Integrity, Skyscraping, and ofc Assort. It really does make development so much easier when I don’t have to worry about where I put everything. After having all the infrastructure set up, being able to just add comments to a .md file and have it automatically render to a webpage is pretty awesome. The best part is being able to hide all the processing away from the Markdown preview!
Why does Squarkdown on NPM only support Windows and Linux?
For crates.io users will run cargo install squarkdown which will build Squarkdown from source on their machine, so a crates.io works on any platform.
However, NPM ofc doesn’t do that, so it needs prebuilt binaries. I have a Windows machine, and I can build a Linux binary via WSL.
Why not publish via GitHub Actions so I can matrix all the platforms? Short answer: I’m lazy. Long answer: I much prefer manually publishing locally, it feels more controlled and intentional.
How fast is Squarkdown?
With the Rust rewrite, fast enough! On my Windows machine the Squarkdown docs take under 50 ms to squarkup, but on GitHub Action’s Linux machine the whole thing finishes in under 10 ms. Execution time varies a lot depending on system speed and delays. Run it yourself and see, right?
What is Squarkdown spending its time doing?
Squarkdown spends most of its time doing 3 (or 4) things:
- Finding
.mdfiles to squarkup - Parsing their charm squark for metadata
- Rendering each page to
+page.svxand+page.ts - Saving site data (if enabled)
Rendering takes the longest because Squarkdown is reading, parsing, processing and rendering your entire file. So the longer the file, the more work it has to do.
Saving site data can also take a hot sec if you have a lot of metadata, since Squarkdown needs to write a huge JSON file to disk.
The first two parts are pretty fast, and Squarkdown avoids unnecessary work by skipping ignored directories and only reading files up to the end of their charm squark.
Where does the name Squarkdown come from?
Squarkdown is an abbreviation of the full name Stranger Quarkdown. It’s the successor to my original tool Quarkdown (now deprecated). You can find out more in Synopsis!
Why Ruby (originally)?
It’s a cute language :3
I needed an excuse (or rather, a project) to use it, so I decided I’d give writing Squarkdown in Ruby a shot. It went pretty swimmingly, to be honest, almost zero hitches. Ruby just works ^v^
Why the Rust rewrite?
Unfortunately, as much as I loved Ruby, it… was just getting unmanageable. I love its syntax, but the lack of type annotations just made things incredibly painful. The whole system felt very fragile.
Why Rust, then? Well, one of my aims was to make Squarkdown much faster. So Python was out the window. I also wanted to make it easily distributable,1 so TypeScript/JavaScript was the clear choice (especially since the tool is for SvelteKit projects, which themselves use TypeScript/JavaScript).
But TypeScript’s boringgg. I don’t want to write another TypeScript project. So Rust was the next-best option ;)
Well, what can I say. It works great, feels amazing to build upon, and the test suite is blooming. So no regrets at all!
Was this website built with Squarkdown?
Of course! (Imagine if it weren’t!) The text you’re reading now is sourced from a .md file in the Squarkdown repo ;)
More details are available in Synopsis.
- The previous method of using a Git submodule, while easy, was a little scuffed for versioning. Basically meant everyone would be using a nightly version of Squarkdown!!↩