<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Rista</title>
  <id>https://rista.paradoji.co/</id>
  <link href="https://rista.paradoji.co/"/>
  <link rel="self" href="https://rista.paradoji.co/feed.xml"/>
  <updated>2026-12-01T00:00:00Z</updated>
  <author><name>Rista contributors</name></author>
  <entry>
    <title>How this site is built</title>
    <id>https://rista.paradoji.co/blog/2026/12/01/how-this-site-is-built</id>
    <link href="https://rista.paradoji.co/blog/2026/12/01/how-this-site-is-built"/>
    <updated>2026-12-01T00:00:00Z</updated>
    <summary>A tour of the source of this site, which is the example in the Rista repository.</summary>
    <content type="html">&lt;p&gt;This site is the &lt;code&gt;example/&lt;/code&gt; directory of the Rista repository. Its test is
also the gem’s integration test, so every feature described in the
&lt;a href=&quot;/docs&quot;&gt;documentation&lt;/a&gt; is used here.&lt;/p&gt;&lt;h2 id=&quot;four-kinds-of-page&quot;&gt;Four kinds of page&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;The front page&lt;/strong&gt; is one Haml file, &lt;code&gt;src/routes/+page.haml&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The documentation&lt;/strong&gt; is a set of Markdown files in
&lt;code&gt;src/routes/docs/_pages&lt;/code&gt;. One route, &lt;code&gt;docs/[slug]&lt;/code&gt;, renders them. A layout
in &lt;code&gt;docs/&lt;/code&gt; adds the list of pages beside each one.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The about page&lt;/strong&gt; is a Markdown file that is a page itself,
&lt;code&gt;src/routes/about/+page.md&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The blog&lt;/strong&gt; is a set of Markdown files in &lt;code&gt;src/routes/blog/_posts&lt;/code&gt;, served
at dated paths such as &lt;code&gt;/blog/2026/12/01/how-this-site-is-built&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&quot;one-module-per-kind-of-content&quot;&gt;One module per kind of content&lt;/h2&gt;&lt;p&gt;&lt;code&gt;src/posts.rb&lt;/code&gt; loads every post and answers every question about them:&lt;/p&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot;&gt;POSTS = import_glob(&amp;quot;./routes/blog/_posts/*.md&amp;quot;).values.sort_by { it::Frontmatter.fetch(:date) }.freeze

module Default
  def self.all = POSTS
  def self.tags = POSTS.flat_map { tags_of(it) }.uniq.sort
end
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The post page, the archives, the tag pages and the feed all import it, so
sorting and grouping live in one place. &lt;code&gt;src/docs.rb&lt;/code&gt; does the same for the
documentation.&lt;/p&gt;&lt;p&gt;None of this is gem code. Tags, date archives, cover images, the pages of the
blog index and the previous and next links are routes and one shared module.&lt;/p&gt;&lt;h2 id=&quot;files-that-are-not-pages&quot;&gt;Files that are not pages&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;feed.xml&lt;/code&gt; is the return value of &lt;code&gt;src/routes/feed.xml/+route.rb&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;code&gt;sitemap.xml&lt;/code&gt; is written by the build, from the &lt;code&gt;url&lt;/code&gt; in &lt;code&gt;src/site.rb&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;code&gt;404.html&lt;/code&gt; is &lt;code&gt;src/routes/+not-found.haml&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;code&gt;robots.txt&lt;/code&gt; is copied from &lt;code&gt;public/&lt;/code&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&quot;serving-it&quot;&gt;Serving it&lt;/h2&gt;&lt;p&gt;&lt;code&gt;rista nginx&lt;/code&gt; prints the config for the built files. &lt;code&gt;example/Dockerfile&lt;/code&gt;
builds the site and puts both into an nginx image.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Introducing Rista</title>
    <id>https://rista.paradoji.co/blog/2026/11/03/introducing-rista</id>
    <link href="https://rista.paradoji.co/blog/2026/11/03/introducing-rista"/>
    <updated>2026-11-03T00:00:00Z</updated>
    <summary>A static site generator for Ruby, built on the Klenod module bundler.</summary>
    <content type="html">&lt;p&gt;Rista is a static site generator for Ruby. It renders a directory of routes to
plain HTML files, with hashed CSS, JavaScript and image assets beside them.&lt;/p&gt;&lt;p&gt;It is built on &lt;a href=&quot;https://github.com/aalin/klenod&quot;&gt;Klenod&lt;/a&gt;, a module bundler for
Ruby. Klenod loads Ruby, Haml, Markdown, CSS, TypeScript and image files as
modules and provides a file-based router. Rista adds the part that turns a
route into an HTML string, and writes the result to disk.&lt;/p&gt;&lt;h2 id=&quot;what-you-get&quot;&gt;What you get&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Pages written in Haml, and content written in Markdown with front matter&lt;/li&gt;&lt;li&gt;Routes from the file system, including routes with params&lt;/li&gt;&lt;li&gt;Stylesheets scoped to one template&lt;/li&gt;&lt;li&gt;Hashed assets that can be cached forever&lt;/li&gt;&lt;li&gt;Images in several widths and formats, with the &lt;code&gt;srcset&lt;/code&gt; written for you&lt;/li&gt;&lt;li&gt;Google Fonts downloaded once, then served from the site&lt;/li&gt;&lt;li&gt;A description and Open Graph tags for each page, from the page itself or
from its front matter&lt;/li&gt;&lt;li&gt;An Atom feed, a sitemap and 404 pages&lt;/li&gt;&lt;li&gt;A build that fails on a link to a page the site does not have&lt;/li&gt;&lt;li&gt;A development server that reloads the browser on change&lt;/li&gt;&lt;li&gt;An nginx config generated for the built site, and a command that sets up a
deploy to Cloudflare or GitHub Pages&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&quot;what-you-do-not-get&quot;&gt;What you do not get&lt;/h2&gt;&lt;p&gt;There is no client runtime and nothing is hydrated. A page’s JavaScript is
whatever its modules import, and a page that imports none still works.&lt;/p&gt;&lt;p&gt;There is also no content model. A post is a Markdown file, its front matter is
whatever the site decides it is, and tags or archives are ordinary routes. The
&lt;a href=&quot;/docs&quot;&gt;documentation&lt;/a&gt; shows how, and this site is the worked example.&lt;/p&gt;&lt;h2 id=&quot;trying-it&quot;&gt;Trying it&lt;/h2&gt;&lt;p&gt;&lt;a href=&quot;/docs/getting-started&quot;&gt;Getting started&lt;/a&gt; takes a new directory to a built
site.&lt;/p&gt;</content>
  </entry>
</feed>
