diff --git a/internal/domain/config.go b/internal/domain/config.go index 9b194b2..6e3295b 100644 --- a/internal/domain/config.go +++ b/internal/domain/config.go @@ -29,7 +29,6 @@ type ( Port string `env:"PORT" envDefault:"3000"` Protocol string `env:"PROTOCOL" envDefault:"http"` RootURL string `env:"ROOT_URL" envDefault:"{{protocol}}://{{domain}}:{{port}}/"` - StaticURLPrefix string `env:"STATIC_URL_PREFIX"` } ConfigDatabase struct { @@ -92,7 +91,6 @@ func TestConfig(tb testing.TB) *Config { Port: "3000", Protocol: "http", RootURL: "{{protocol}}://{{domain}}:{{port}}/", - StaticURLPrefix: "/static", }, Database: ConfigDatabase{ Type: "memory", @@ -128,10 +126,9 @@ func (cs ConfigServer) GetAddress() string { // GetRootURL returns generated root URL from template RootURL. func (cs ConfigServer) GetRootURL() string { return fasttemplate.ExecuteString(cs.RootURL, `{{`, `}}`, map[string]any{ - "domain": cs.Domain, - "host": cs.Host, - "port": cs.Port, - "protocol": cs.Protocol, - "staticUrlPrefix": cs.StaticURLPrefix, + "domain": cs.Domain, + "host": cs.Host, + "port": cs.Port, + "protocol": cs.Protocol, }) } diff --git a/main.go b/main.go index 1707a8b..23d1b53 100644 --- a/main.go +++ b/main.go @@ -133,7 +133,7 @@ func init() { logger.Fatalln("cannot parse root URL as client URL:", err) } - if indieAuthClient.Logo[0], err = url.Parse(rootURL + config.Server.StaticURLPrefix + "/icon.svg"); err != nil { + if indieAuthClient.Logo[0], err = url.Parse(rootURL + "icon.svg"); err != nil { logger.Fatalln("cannot parse root URL as client URL:", err) } diff --git a/web/baseof.qtpl b/web/baseof.qtpl index ad7660d..c75f730 100644 --- a/web/baseof.qtpl +++ b/web/baseof.qtpl @@ -39,18 +39,18 @@ en {% func (p *BaseOf) Head() %} {% comment %}https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs{% endcomment %} + href="/apple-touch-icon.png"> + href="/manifest.webmanifest"> {% endfunc %} {% func (p *BaseOf) Body() %}{% endfunc %} diff --git a/web/baseof.qtpl.go b/web/baseof.qtpl.go index 871c918..64a4faf 100644 --- a/web/baseof.qtpl.go +++ b/web/baseof.qtpl.go @@ -152,23 +152,7 @@ func (p *BaseOf) StreamHead(qw422016 *qt422016.Writer) { //line web/baseof.qtpl:39 qw422016.N().S(` `) //line web/baseof.qtpl:40 - qw422016.N().S(` `) + qw422016.N().S(` `) //line web/baseof.qtpl:54 }