mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 12:14:49 +00:00
No double slash when destination set to '/'
This commit is contained in:
1 parent
ef0b9b511c
commit
cb48425f2d
1 file changed
+5
@@ -352,6 +352,11 @@ func build(watches ...bool) {
|
||||
func copyStatic() error {
|
||||
publishDir := helpers.AbsPathify(viper.GetString("PublishDir")) + "/"
|
||||
|
||||
// If root, remove the second '/'
|
||||
if publishDir == "//" {
|
||||
publishDir = "/"
|
||||
}
|
||||
|
||||
syncer := fsync.NewSyncer()
|
||||
syncer.NoTimes = viper.GetBool("notimes")
|
||||
syncer.SrcFs = hugofs.SourceFs
|
||||
|
||||
Reference in new issue
Block a user