-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f924ad5
commit 693d61f
Showing
6 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ import phosphor from "https://deno.land/x/[email protected]/phosphor.ts"; | |
import picture from "lume/plugins/picture.ts"; | ||
import transformImages from "lume/plugins/transform_images.ts"; | ||
import brotli from "lume/plugins/brotli.ts"; | ||
import onDemand from "lume/plugins/on_demand.ts"; | ||
|
||
const site = lume( | ||
{ | ||
|
@@ -60,6 +61,16 @@ site.use(transformImages({ | |
matches: /\.(jpg|jpeg|png|webp)$/i, // This regex matches only image files | ||
})); | ||
site.use(brotli()); | ||
site.use(onDemand({ | ||
extraData(request: Request) { | ||
const searchParams = new URL(request.url).searchParams; | ||
const params = Object.fromEntries(searchParams.entries()); | ||
|
||
return { | ||
params, | ||
}; | ||
}, | ||
})); | ||
|
||
site.copy("assets"); | ||
// site.copy("static/portfolio", "portfolio"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* Don't execute this function | ||
* It's just statically analyzable so dynamic imports work on Deno Deploy | ||
* @see https://deno.com/deploy/changelog#statically-analyzable-dynamic-imports | ||
*/ | ||
export function toStaticallyAnalyzableDynamicImports() { | ||
import("./src/archive/index.ts"); | ||
import("./src/_data.ts"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"/ondemand/": "/ondemand.vto" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
layout: layouts/base.vto | ||
ondemand: true | ||
--- | ||
|
||
Hello {{ params.name }} |
693d61f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failed to deploy: