Hepek Static Site Generator

Hepek SSG writes Scala objects to files.
An object MyPage is written to a file my-page.html.
There is no special new markup/template language to learn, just plain old Scala.
Ctrl + Space and you get all the help you need.

Of course, instead of stitching Strings together you use:

Scalatags

Example:

def pageContent = div(
  h1("My Page"),
  ul(
    li("hello"),
    li("world")
  )
)

With Scalatags:

  • it is impossible to forget closing tags
  • you can use for loops, collections and all goodies Scala provides
  • reuse is trivial with helper defs

Markdown

Example:

def pageContent = div(
  s"""
    ## My Page
    - hello
    - world  
  """.md
)

This makes it easy to interpolate values inside markdown, rather that using error-prone YAML front matter..

Static to the Max

Code snippets

The code snippets in markdown are rendered statically, via Shiki nodejs library.
No need for any JS libraries in the browser.

Note that you need to have nodejs installed.

```scala
val str = "Hello, world!"
```

renders as:

val str = "Hello, world!"

Math snippets

```math
A \setminus B = {x | x \in A \land x \notin B}
```

renders as:

AB=xxAxBA \setminus B = {x | x \in A \land x \notin B}

Note that you need to have nodejs installed. Note that you need to add the KaTeX CSS!

Why Hepek?

There is no kilometer of HTML, emmet snippets, regex find-and-replace...
Everything is nice and tidy with functions, for loops, data abstractions, markdown etc.

Content is just a Scala object, use it directly to construct table of contents, RSS feed, sitemap.xml, PDFs etc.

Sick of rewriting relative urls all over the place, like my/folder/../styles.....?
Me too, the year is 2025, we can do better!
Just use .ref method and you're done!
Hepek SSG figures out relative path for you!