Hepek Static Site Generator
Hepek SSG writes Scala object
s 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 String
s together you use:
- Scalatags DSL for HTML
- Markdown for text
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
def
s
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:
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!