site

package module
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 6 Imported by: 0

README ¶

tinywasm/site

Project Badges

Site rendering engine for Go (WASM-friendly).

A lightweight rendering layer built on top of tinywasm/dom, designed to generate web pages with minimal overhead. Provides small, efficient primitives for composing views, routing, and rendering UI structures while keeping WebAssembly binaries tiny and dependency-free.

📚 Documentation

  1. Architecture: High-level overview and design goals.
  2. Modules: Routes and modular structure.
  3. Components: UI building blocks and icons.
  4. Routing: Typed routing and path generation.
  5. Access Control: Security and SSR vs SPA logic.
  6. Assets: Bundling and resource management.

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

func Build ¶

func Build(am *assetmin.AssetMin) error

Build registers all assets with assetmin

func GetCrudP ¶

func GetCrudP() *crudp.CrudP

GetCrudP returns the global crudp instance

func GetModules ¶

func GetModules() []*module

GetModules returns all registered modules

func Mount ¶ added in v0.0.5

func Mount(mux *http.ServeMux) error

Mount configures the server handled by site. It initializes assetmin and registers all routes.

func RegisterHandlers ¶

func RegisterHandlers(handlers ...any) error

RegisterHandlers registers all handlers with site and crudp

func RenderNavigation ¶

func RenderNavigation() string

RenderNavigation generates nav HTML from registered public modules

Types ¶

type Config ¶ added in v0.0.5

type Config struct {
	PublicDir   string
	DevMode     bool
	AssetsCache bool // Forces assetmin to cache or not. If nil/false/true depends on logic.
}

Config defines the configuration for the site mount

Directories ¶

Path Synopsis
example
web command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL