feat(config): supports external link for images
This commit is contained in:
parent
b7829c5268
commit
b87964e81f
3 changed files with 20 additions and 3 deletions
5
main.go
5
main.go
|
@ -7,6 +7,7 @@ import (
|
|||
"fmt"
|
||||
"github.com/BurntSushi/toml"
|
||||
"github.com/anhgelus/golatt"
|
||||
"html/template"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"os"
|
||||
|
@ -127,6 +128,10 @@ func main() {
|
|||
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
|
||||
}
|
||||
|
||||
g.TemplateFuncMap = template.FuncMap{
|
||||
"getImage": getImage,
|
||||
}
|
||||
|
||||
host := fmt.Sprintf(":%d", port)
|
||||
if dev {
|
||||
if port != 80 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue