README.md

WebLS

A Gleam library for generating sitemaps and RSS feeds and more. to meet all your common web listing needs.

Package Version Hex Docs

sh
1gleam add webls
gleam
1import gleam/option.{None}
2import webls/sitemap.{Sitemap}
3
4pub fn sitemap() -> String {
5 let sitemap =
6 Sitemap(url: "https://gleam.run/sitemap.xml", last_modified: None, items: [
7 sitemap.item("https://gleam.run")
8 |> sitemap.with_frequency(sitemap.Monthly)
9 |> sitemap.with_priority(1.0),
10 sitemap.item("https://gleam.run/blog")
11 |> sitemap.with_frequency(sitemap.Weekly),
12 sitemap.item("https://gleam.run/blog/gleam-1.0"),
13 sitemap.item("https://gleam.run/blog/gleam-1.1"),
14 ])
15
16 sitemap |> sitemap.to_string()
17}

Further documentation can be found at https://hexdocs.pm/webls.

Development

sh
1gleam run # Run the project
2gleam test # Run the tests

Yes the name is a reference to the ls command in unix to list files