-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@iuioiua, check it out. Converting it to a plugin is pretty straightforward. There's just this module resolution issue that I need to resolve. You can see the damage here, where I had to do this: ```diff - import Head from "@/components/Head.tsx"; - import Share from "@/components/Share.tsx"; + import Head from "../../../components/Head.tsx"; + import Share from "../../../components/Share.tsx"; ``` --------- Co-authored-by: Asher Gomez <[email protected]>
- Loading branch information
Showing
27 changed files
with
66 additions
and
48 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 |
---|---|---|
|
@@ -20,8 +20,7 @@ | |
"compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" }, | ||
"imports": { | ||
"@/": "./", | ||
"$fresh/": "https://deno.land/x/[email protected]/", | ||
"$gfm": "https://deno.land/x/[email protected]/mod.ts", | ||
"$fresh/": "https://raw.githubusercontent.com/denoland/fresh/60220dd33b5b0f6b5c72927c933dbc32a3c4734e/", | ||
"preact": "https://esm.sh/[email protected]", | ||
"preact/": "https://esm.sh/[email protected]/", | ||
"preact-render-to-string": "https://esm.sh/*[email protected]", | ||
|
@@ -30,9 +29,8 @@ | |
"tailwindcss": "npm:[email protected]", | ||
"tailwindcss/": "npm:/[email protected]/", | ||
"tailwindcss/plugin": "npm:/[email protected]/plugin.js", | ||
"std/": "https://deno.land/[email protected]/", | ||
"$std/": "https://deno.land/[email protected]/", | ||
"stripe": "npm:/[email protected]", | ||
"feed": "npm:/[email protected]", | ||
"kv_oauth/": "https://deno.land/x/[email protected]/", | ||
"tabler_icons_tsx/": "https://deno.land/x/[email protected]/tsx/", | ||
"fresh_charts/": "https://deno.land/x/[email protected]/" | ||
|
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 |
---|---|---|
|
@@ -7,6 +7,7 @@ import securityHeaders from "./plugins/security_headers.ts"; | |
import welcomePlugin from "./plugins/welcome.ts"; | ||
import type { FreshConfig } from "$fresh/server.ts"; | ||
import { ga4Plugin } from "https://deno.land/x/[email protected]/mod.ts"; | ||
import { blog } from "./plugins/blog/mod.ts"; | ||
|
||
export default { | ||
plugins: [ | ||
|
@@ -17,5 +18,6 @@ export default { | |
tailwind(), | ||
errorHandling, | ||
securityHeaders, | ||
blog(), | ||
], | ||
} satisfies FreshConfig; |
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
File renamed without changes.
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,24 @@ | ||
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license. | ||
import type { Plugin } from "$fresh/server.ts"; | ||
import BlogIndex from "./routes/blog/index.tsx"; | ||
import BlogSlug from "./routes/blog/[slug].tsx"; | ||
import Feed from "./routes/feed.ts"; | ||
import { normalize } from "$std/url/normalize.ts"; | ||
|
||
export function blog(): Plugin { | ||
return { | ||
name: "blog", | ||
routes: [{ | ||
path: "/blog", | ||
component: BlogIndex, | ||
}, { | ||
path: "/blog/[slug]", | ||
component: BlogSlug, | ||
}, { | ||
path: "/feed", | ||
component: Feed, | ||
}], | ||
location: import.meta.url, | ||
projectLocation: normalize(import.meta.url + "../../../").href, | ||
}; | ||
} |
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
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
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
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
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
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
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
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
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
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