diff options
| author | Leonardo Bishop <me@leonardobishop.com> | 2023-08-28 20:44:28 +0100 |
|---|---|---|
| committer | Leonardo Bishop <me@leonardobishop.com> | 2023-08-28 20:44:28 +0100 |
| commit | b31733593683374366058a23a0a470911e2722c0 (patch) | |
| tree | 50b91d5e4fe7fdc7f3befef11228c2f75c3fcdb8 /app | |
| parent | 8f4f459f8cc34c89c40f67ab9f5f8c553547c881 (diff) | |
Add leading slash to routes
Diffstat (limited to 'app')
| -rw-r--r-- | app/builder/pages.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/builder/pages.ts b/app/builder/pages.ts index c1c2474..bc2c14a 100644 --- a/app/builder/pages.ts +++ b/app/builder/pages.ts @@ -44,7 +44,7 @@ export class PageDirectory { } public loadPage = (page: string): Page => { - let route = page.replace(/\.[^.]*$/,'') + let route = `/${page.replace(/\.[^.]*$/,'')}`; let name = /[^/]*$/.exec(route)[0]; let originalPath = page; let fullPath = `${this.pagesPath}/${page}` |
