Embed or serve from disk
Why the stylesheet and the posts live inside the executable instead of a folder next to it.
There are two ways to ship a site that has no database: copy files next to the binary, or put the files inside it. The second one removes a category of bugs that only appear in production, at the cost of a rebuild for every edit.

The directive
go:embed reads files at compile time and gives the program an embed.FS,
which behaves like a read only filesystem.
package content
import "embed"
//go:embed *.md all:media
var Files embed.FS
*.md takes the posts at the top of the folder. all:media takes the image
folders, including files whose names start with a dot or an underscore, which
the plain pattern would skip.
What the folder version gets wrong
When the files live on disk, the deployed thing is not the binary, it is the binary plus a directory tree. That tree can be incomplete, stale, or mounted from the wrong volume. The failure is quiet:
- The page loads, the stylesheet 404s, and the site looks broken.
- A post exists in the source but not in the copy, so the link 404s.
- Two environments run the same binary and serve different content.
With go:embed the binary is the deploy. If it started, the content is there.

The cost
Every text change needs a new binary and a restart, and the site is down for the seconds that takes. There is no hot reload during authoring.
For a personal site the trade is easy. For a wiki edited hourly it would be the wrong choice, and a content directory or a database would earn its complexity.
A build step you can reproduce beats a deploy step you cannot inspect.
Checking the embedding worked
go test can open the embedded filesystem and look for a known file, which
turns "did the build include the assets" into an assertion instead of a manual
click through.
func TestMediaIsEmbedded(t *testing.T) {
if _, err := Files.ReadFile("media/README.md"); err != nil {
t.Fatalf("media is missing from the binary: %v", err)
}
}