-
-
Notifications
You must be signed in to change notification settings - Fork 459
Incremental static regeneration #1028
Changes from 10 commits
31f313c
35cf5ff
65ba637
0ee2f55
6f1ce93
fc8bd38
8a0d5ff
67cda68
16fe62b
26ed898
ef7d03b
f4548b3
b52d762
3dc480f
127698b
7eb5bb4
a3eb635
30d0e51
c03105f
6adf890
9dbfb27
f0650f2
57b403b
43f064a
db31e75
6f0f45c
26c8449
f397f50
631d8c0
5fc9807
b8cb485
99ec48c
93a0826
10f9f67
cb5ad0b
f9806d2
3552751
09f739f
41202f3
d9417b8
1f757d1
fbe017e
027e9c1
855fc88
436b584
90ce486
d546e02
a3c3e36
738335e
bf8038a
e49eac4
b13cb05
aaa0916
f104d19
bf6ceed
200f195
e2cae31
f4e5218
2cde26b
3c37c3f
7586260
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know you started around or before @jvarho refactored a lot to core package, but maybe you can at least move some of these isolated files there that are not related to AWS/Lambda@Edge stuff? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've yet to touch the response handler in by refactoring precisely to avoid conflicting with this pull request. Much of the remaining response handler routing logic can be refactored away, I believe. But it will be easier after both this and my currently open PR are merged to master. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool, let's update this in a follow-up PR. |
||
* Removes html and adds the trailing slash if needed. This is used when | ||
* regenerating an SSG page. | ||
*/ | ||
export const cleanRequestUriForRouter = ( | ||
uri: string, | ||
trailingSlash?: boolean | ||
): string => { | ||
if (uri.endsWith(".html")) { | ||
uri = uri.slice(0, uri.length - 5); | ||
if (trailingSlash) { | ||
uri += "/"; | ||
} | ||
} | ||
return uri; | ||
}; |
Uh oh!
There was an error while loading. Please reload this page.