Url joining

This commit is contained in:
Elio Struyf
2021-11-02 16:32:36 +01:00
parent 6625b69170
commit 31fd1f93ce
3 changed files with 11 additions and 3 deletions
+4 -3
View File
@@ -7,6 +7,7 @@ import { PreviewSettings } from '../models';
import { format } from 'date-fns';
import { DateHelper } from '../helpers/DateHelper';
import { Article } from '.';
import { urlJoin } from 'url-join-ts';
export class Preview {
@@ -118,9 +119,9 @@ export class Preview {
</head>
<body>
<div class="slug">
<input type="text" value="${join(localhostUrl.toString(), slug || '')}" disabled />
<input type="text" value="${urlJoin(localhostUrl.toString(), slug || '')}" disabled />
</div>
<iframe src="${join(localhostUrl.toString(), slug || '')}" >
<iframe src="${urlJoin(localhostUrl.toString(), slug || '')}" >
</body>
</html>`;
}
@@ -137,4 +138,4 @@ export class Preview {
pathname
};
}
}
}