assets.go
⎇
Raw
1// Package vidarchive embeds the web assets (templates and static files) into the
2// binary so it runs correctly regardless of the working directory or where the
3// binary is installed — no reliance on locating the source tree at runtime.
4package vidarchive
5
6import "embed"
7
8// TemplatesFS holds the HTML templates under web/templates.
9//
10//go:embed web/templates/*.html
11var TemplatesFS embed.FS
12
13// StaticFS holds the static assets (CSS, icons) under web/static. The all: prefix
14// ensures files that would otherwise be skipped (none currently, but future
15// dotfiles) are still embedded.
16//
17//go:embed all:web/static
18var StaticFS embed.FS
19