Skip to content

TanklesXL/tanklesxl.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lustre_ssg start template

This is a dead simple demo repo to show you how to get started today with lustre and lustre_ssg. We're missing lots of using things that would make this experience nicer - most notably a nice markdown parser.

As a semi-workaround. This template repo defines a Content type (and a companion InlineContent type) that lets you write content in a slightly more focused manner than just directly writing the HTML.

We use PicoCSS as a sensible drop-in CSS framework.

An example website created with this template.

Getting started

Run gleam run -m build to generate the static HTML for your site. How you serve it is up to you: everything you need to serve will be in the dist/ directory.

Adding pages

Add a new page by creating another gleam file inside src/content/. From there import all the constructors you need from content and define a public const. Each page should look something like:

import content.{Title, Section, Text}

pub const content = [
  Title("This is a page"),
  Section([
    Text("Here is some content!")
  ])
]

Then head over to the build script, import your new page, and add it to the pipeline:

pub fn main() {
  ssg.new("./dist")
  |> ssg.add_static_route("/", page(index.content, "Home"))
  |> ssg.add_static_route("/your-new-page", page(your_new_page.content, "Your new page!"))
  |> ...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published