Skip to main content

Documentation Refresh and new API Reference

· 2 min read
Kristofer Löfberg
Elmish Land creator

The Elmish Land documentation has been refreshed with a new API Reference section, improved organization, and enhanced content.

API Reference

The API Reference section documents all modules, functions, and configuration options with:

  • Function signatures and parameter descriptions
  • Examples showing common usage patterns
  • Best practices for error handling and edge cases
  • Guidance on when to use each feature

The API Reference includes:

  • Page Module - Page.from, Page.withSubscriptions, and page lifecycle functions
  • Layout Module - Layout.from, Layout.withSubscriptions, routeChanged and more
  • Command Module - All command functions
  • Route Module - Route.format for type-safe navigation, Route.isEqualWithoutPathAndQuery for active link styling and more
  • Route Configuration - route.json configuration with path parameters, query parameters, built-in types, and custom types
  • App Configuration - elmish-land.json configuration options
  • CLI Reference - Command-line interface documentation

JSON Schema for Configuration files

A new JSON Schema for elmish-land.json and route.json files provides:

  • IntelliSense in supported editors
  • Validation for configuration errors
  • Documentation for all options

The schemas can be referenced in elmish-land.json and route.json:

// elmish-land.json
{
"$schema": "https://elmish.land/schemas/v1.1/elmish-land.schema.json",
...
}

and

// route.json
{
"$schema": "https://elmish.land/schemas/v1/route.schema.json",
...
}

Core concepts

The Core concept guides have been updated with new documentation: