Giter Site home page Giter Site logo

tanklesxl.github.io's Introduction

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!"))
  |> ...

tanklesxl.github.io's People

Contributors

tanklesxl avatar

Stargazers

Lubomir Anastasov avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.