|
|
|
@ -107,6 +107,9 @@ func baseNoExt(name string) string { |
|
|
|
|
func (t tmplData) IframeSource() string { |
|
|
|
|
name := baseNoExt(t.docref.name) |
|
|
|
|
ctype := baseNoExt(path.Dir(t.docref.name)) |
|
|
|
|
if ctype == "content" { |
|
|
|
|
return fmt.Sprintf("/hugo/draft/%s/%s/", base64.RawURLEncoding.EncodeToString([]byte(t.docref.name)), strings.Replace(name, " ", "-", -1)) |
|
|
|
|
} |
|
|
|
|
return fmt.Sprintf("/hugo/draft/%s/%s/%s/", base64.RawURLEncoding.EncodeToString([]byte(t.docref.name)), ctype, strings.Replace(name, " ", "-", -1)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|