Skip to content

avdgaag/gleam_ag_html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTML

Package Version Hex Docs

Generate HTML using functions, much like elm-html.

Quick start

import html.{html, head, body, p, text, render_document}
import html/attributes.{class}

pub fn hello_world() -> String {
  html([
    head([], []),
    body([
      p([text("Hello, world!")], [class("big")])
    ], [])
  ], [])
  |> render_document()
}
/// will return:
///
///   "<!doctype html><html><head></head><body><p class=\"big\">Hello, world!</p></body></html>"

Installation

If available on Hex this package can be added to your Gleam project:

gleam add html

and its documentation can be found at https://hexdocs.pm/ag_html.

About

A Gleam library for building HTML strings usings functions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages