asset

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src, dst string) error

CopyDir copies all files from src to dst recursively (without fingerprinting).

Types

type Refs

type Refs struct {
	CSS        string
	JSHead     string
	JS         string
	FlexSearch string
	KaTeX      string
	Extra      map[string]string // original basename → fingerprinted URL
}

Refs holds the final URLs for fingerprinted assets.

func ProcessAssets

func ProcessAssets(staticDir, outputDir string) (Refs, error)

ProcessAssets fingerprints CSS/JS files and copies static assets. staticDir: source directory (e.g. site/static/) outputDir: destination (e.g. public/) Returns asset refs with fingerprinted URLs.

Jump to

Keyboard shortcuts

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