Welcome to Yagss!

A brief introduction into how to build a site with yagss.

The following examples are meant to show some of the things you can build with a yagss site. They also show some patterns and quirks for how data is passed around the build system. This is very much a work in progress.

Article with Images

Automatically create responsive images

This is an example article showing how to include static components like images in them.

One of the most powerful features of Yagss is how it automatically scales jpeg images in the source directory and parses their metadata, making that metadata availale to the rendering context.

A close-up of a flower in Crestwood, Washington, DC
A close-up of a flower in Crestwood, Washington, DC

This is simply a collection of snippets of text written in markdown, interspersed with snippets of yaml specifying which template to use.

Two doves sitting on a fence in Crestwood, Washington, DC
Two doves sitting on a fence in Crestwood, Washington, DC

There is no need for hydration because the DOM never changes after the build process is run.

Charts in figures

A short demo of an article featuring charts made with recharts

This is an example article showing how to include interactive charts using the recharts library.

Fig. 1. Simple Line Chart

Each figure can be self-contained because each element can have its own call to ReactDOM.hydrate. In other words, this doesn’t need to be a “single page application” where there is one root element and every child is rendered by React. I prefer thinking of these as “single div applications.”

Fig. 2. Simple Pie Chart

Eventually we will want to migrate this example to something that makes charts that are usable prior to calling hydrate.

Video Clip

A short demo of a video embedded in an article

This is an example article showing how to include videos encoded as HLS.

0:00
1:00

Each video is its own instance of a React-based video player.