rakyll/statik

Embed files into a Go executable

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 17 minutes ago
Added to GitGenius on September 18th, 2026
Created on February 4th, 2014
Open Issues & Pull Requests: 39 (+0)
GitHub issues: Enabled
Number of forks: 227
Total Stargazers: 3,824 (+0)
Total Subscribers: 45 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 1398.0 days
Mean response time: 1398.0 days
90th percentile: 1398.0 days
Tracked items: 1

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 0
New in 7 days: 0
Closed in 7 days: 0
Avg open age: N/A days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

statik is a command-line tool that embeds a directory of static files into a Go binary as an http.FileSystem.

The problem statik solves is the need to distribute Go applications with web components without deploying static assets separately. It works by reading a directory of files and generating a Go source file containing their contents, which can then be imported and served via an http.FileServer. This approach allows developers to ship a single binary containing images, CSS, JavaScript, and other static resources.

The tool suits projects where static files are modest in size and will be accessed by a limited number of users. It is particularly valuable for tools with web interfaces that need to be distributed as standalone binaries. The README notes that the idea and implementation were originally derived from camlistore but decoupled for independent use.

The project includes a command-line interface that accepts options to filter files by extension and to control whether file modification times are stored. It provides a working example demonstrating how to generate the embedded package, initialize a statik file system, and serve files. The tool also addresses deterministic output concerns by offering a flag to exclude modification times, which helps with continuous integration workflows that verify generated code matches checked-in static files.