themedefault

package module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 5 Imported by: 2 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

modules/theme-default

Official Lesstruct module: the default theme artifact — embedded layouts, static assets, and template funcs consumed by the site-ssr engine.

Layout (module template)

module.go            # kernel.Module + ThemeProvider (single registry-facing file)
files.go             # embedded pages/ + static/ artifact + Files() accessor
pages/               # embedded *.gohtml layouts (moved verbatim)
static/              # embedded CSS/JS assets (moved verbatim)
admin/               # admin-shell manifest (empty: themes ship no admin UI)
testutil/            # kernel fixture for module tests

Files

The artifact layout mirrors the historical internal/api/template tree so every pages/<name>.gohtml and static/<name> lookup keeps working unchanged: core installs the root filesystem once at startup and resolves THEME_DIR overrides over it. Third-party themes ship as new ThemeProvider modules or as plain THEME_DIR directories.

Documentation

Overview

Package themedefault is the official default theme module: the embedded layouts, static assets, and template funcs the site-ssr engine consumes.

Index

Constants

View Source
const Name = "theme-default"

Name is the registry key for this module.

View Source
const Version = "0.1.0"

Version is the module version reported via Module.Version.

Variables

This section is empty.

Functions

func Files

func Files() fs.FS

Files returns the default theme artifact filesystem, rooted at the directories above (paths like "pages/post.gohtml" and "static/base.css"). Core installs it once at startup via the template package's setter; without it (a custom edition omitting this module) only THEME_DIR files resolve.

Types

type Module

type Module struct{}

Module is the theme-default kernel module.

func New

func New() *Module

New builds the module. The theme artifact is static; construction takes no options.

func (*Module) AdminManifest

func (m *Module) AdminManifest() kernel.AdminExtensionManifest

AdminManifest declares this module's admin-shell extensions. A theme ships no admin UI of its own, so the manifest is empty.

func (*Module) Init

func (m *Module) Init(_ kernel.Kernel) error

Init wires the module. There is nothing to wire beyond the embedded files.

func (*Module) Name

func (m *Module) Name() string

Name returns the registry key.

func (*Module) Optional

func (m *Module) Optional() []string

Optional lists soft dependencies. None.

func (*Module) Requires

func (m *Module) Requires() []string

Requires lists hard dependencies. The theme is a leaf artifact consumed by the site-ssr engine, so nothing is required.

func (*Module) Shutdown

func (m *Module) Shutdown() error

Shutdown releases module resources. There are none beyond memory.

func (*Module) ThemeFiles

func (m *Module) ThemeFiles() fs.FS

ThemeFiles returns the default theme artifact filesystem (layouts under pages/, static assets under static/). The site-ssr engine resolves THEME_DIR overrides over it.

func (*Module) ThemeFuncs

func (m *Module) ThemeFuncs() template.FuncMap

ThemeFuncs returns the template funcs this theme contributes. The default theme adds none beyond the engine's own (urlpath, t, assetURL, formatDate, formatDateTime) — the empty map keeps the provider contract explicit.

func (*Module) Version

func (m *Module) Version() string

Version returns the module version.

Directories

Path Synopsis
Package admin owns this module's admin-shell manifest: the declarative UI the single admin SPA renders for the default theme.
Package admin owns this module's admin-shell manifest: the declarative UI the single admin SPA renders for the default theme.
Package testutil provides the kernel fixture module tests run against.
Package testutil provides the kernel fixture module tests run against.

Jump to

Keyboard shortcuts

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