Skip to content

Commit

Permalink
update statics
Browse files Browse the repository at this point in the history
  • Loading branch information
axiaoxin committed Jun 6, 2021
1 parent 582fe72 commit 95f8da2
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config.default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env = "localhost"
########## 静态文件相关配置
[statics]
# 网页模板路径
tmplpath = "files/html/*"
tmplpath = "html/*"
# 静态文件 URL 路径,网页中通过 /statics/js/xx.js 访问资源,
url = "/statics"

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 4 additions & 6 deletions statics/statics.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// Package statics 静态文件嵌入
// Package statics embed 静态文件
package statics

import "embed"

var (
// Files 静态文件嵌入
//go:embed files/*
Files embed.FS
)
// Files 静态文件资源
//go:embed css/* font/* html/* img/* js/*
var Files embed.FS

0 comments on commit 95f8da2

Please sign in to comment.