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 | |
| parent | 8f4f459f8cc34c89c40f67ab9f5f8c553547c881 (diff) | |
Add leading slash to routes
| -rw-r--r-- | app/builder/pages.ts | 2 | ||||
| -rw-r--r-- | package.json | 2 |
2 files changed, 2 insertions, 2 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}` diff --git a/package.json b/package.json index e6eb3bc..0fa911e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "panulat", - "version": "1.1.2", + "version": "1.1.3", "description": "", "main": "app/index.mjs", "scripts": { |
