Watch this space, but please don't use it yet
HomeSearch Scala.js support InternalsBuilders
Mdoc and classpathRaw API

Under the hood, Subatomic's core idea is "it's all just moving files around" when it comes to building static sites.

Here's a super-short example:

import subatomic._

type Content = Either[String, Int]

def sitemap: Vector[(SitePath, Content)] = Vector(
  SiteRoot / "index.html"            -> Left("Hello world!"),
  SiteRoot / "the" / "answer.html"   -> Right(25)

val site = Site
  .populate { case (site, content) => 
    content match {
      case (path, Left(string)) => 
        site.addPage(path, s"<html><body>String: $string</body></html>")
      case (path, Right(int)) => 
        site.addPage(path, s"<html><body>Integer: $int</body></html>")

And if we want to actually produce files, we can call buildAt:

site.buildAt(os.temp.dir()) // build in a temp folder
Creating site in /tmp/6418042506679874678

    ^--content--> <html><body>String: Hello world!</body></html>
    ^--content--> <html><body>Integer: 25</body></html>