From c8502be442ac0f6d7e42cb1ff3154792e936af15 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 22 Jul 2019 15:00:18 -0400 Subject: [PATCH] Output full URL publishing with --host flag Now that no scheme is required, we need to use the helper function to include it, instead of the raw --host value. This does that. Ref T595 --- api/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/api.go b/api/api.go index 8fac589..06985d2 100644 --- a/api/api.go +++ b/api/api.go @@ -126,8 +126,8 @@ func DoPost(c *cli.Context, post []byte, font string, encrypt, code bool) (*writ if p.Collection != nil { url = p.Collection.URL + p.Slug } else { - if c.GlobalString("host") != "" { - url = c.GlobalString("host") + if host := HostURL(c); host != "" { + url = host } else if cfg.Default.Host != "" { url = cfg.Default.Host } else if config.IsDev() {