Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
{
"tasks": {
"start": "deno run -A --watch=static/,routes/ dev.ts"
"start": "deno run -A --watch=static/,routes/ dev.ts",
"build": "deno run -A dev.ts build",
"preview": "deno run -A main.ts"
},
"importMap": "./import_map.json",
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"
}
"compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" },
"imports": {
"$fresh/": "https://deno.land/x/[email protected]/",
"$std/": "https://deno.land/[email protected]/",
"$gfm": "https://deno.land/x/[email protected]/mod.ts",
"preact": "https://esm.sh/[email protected]",
"preact/": "https://esm.sh/[email protected]/",
"preact-render-to-string": "https://esm.sh/*[email protected]",
"@preact/signals": "https://esm.sh/*@preact/[email protected]",
"@preact/signals-core": "https://esm.sh/*@preact/[email protected]",
"tailwindcss": "npm:[email protected]",
"tailwindcss/": "npm:/[email protected]/",
"tailwindcss/plugin": "npm:/[email protected]/plugin.js"
},
"lint": { "rules": { "tags": ["fresh", "recommended"] } },
"exclude": ["**/_fresh/*"]
}
1,851 changes: 1,458 additions & 393 deletions deno.lock

Large diffs are not rendered by default.

27 changes: 13 additions & 14 deletions fresh.gen.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
// DO NOT EDIT. This file is generated by fresh.
// DO NOT EDIT. This file is generated by Fresh.
// This file SHOULD be checked into source version control.
// This file is automatically updated during development when running `dev.ts`.

import config from "./deno.json" assert { type: "json" };
import * as $0 from "./routes/_404.tsx";
import * as $1 from "./routes/_app.tsx";
import * as $2 from "./routes/blog/[slug].tsx";
import * as $3 from "./routes/index.tsx";
import * as $$0 from "./islands/Counter.tsx";
import * as $_404 from "./routes/_404.tsx";
import * as $_app from "./routes/_app.tsx";
import * as $blog_slug_ from "./routes/blog/[slug].tsx";
import * as $index from "./routes/index.tsx";
import * as $Counter from "./islands/Counter.tsx";
import { type Manifest } from "$fresh/server.ts";

const manifest = {
routes: {
"./routes/_404.tsx": $0,
"./routes/_app.tsx": $1,
"./routes/blog/[slug].tsx": $2,
"./routes/index.tsx": $3,
"./routes/_404.tsx": $_404,
"./routes/_app.tsx": $_app,
"./routes/blog/[slug].tsx": $blog_slug_,
"./routes/index.tsx": $index,
},
islands: {
"./islands/Counter.tsx": $$0,
"./islands/Counter.tsx": $Counter,
},
baseUrl: import.meta.url,
config,
};
} satisfies Manifest;

export default manifest;
10 changes: 5 additions & 5 deletions import_map.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"imports": {
"$fresh/": "https://deno.land/x/fresh@1.1.1/",
"$std/": "https://deno.land/std@0.145.0/",
"$fresh/": "https://deno.land/x/fresh@1.3.1/",
"$std/": "https://deno.land/std@0.195.0/",
"$gfm": "https://deno.land/x/[email protected]/mod.ts",
"preact": "https://esm.sh/preact@10.11.0",
"preact/": "https://esm.sh/preact@10.11.0/",
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@5.2.4",
"preact": "https://esm.sh/preact@10.15.1",
"preact/": "https://esm.sh/preact@10.15.1/",
"preact-render-to-string": "https://esm.sh/*preact-render-to-string@6.2.0",
"@preact/signals": "https://esm.sh/*@preact/[email protected]",
"@preact/signals-core": "https://esm.sh/*@preact/[email protected]",
"twind": "https://esm.sh/[email protected]",
Expand Down
5 changes: 2 additions & 3 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import { start } from "$fresh/server.ts";
import manifest from "./fresh.gen.ts";

import twindPlugin from "$fresh/plugins/twind.ts";
import twindConfig from "./twind.config.ts";
import tailwind from "$fresh/plugins/tailwind.ts";

await start(manifest, { plugins: [twindPlugin(twindConfig)] });
await start(manifest, { plugins: [tailwind()] });
1 change: 1 addition & 0 deletions routes/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default function App({ Component }: AppProps) {
{/* Theme */}
<meta name="theme-color" content="#000" />
{/* Global Styles that couldn't be loaded through Twind */}
<link rel="stylesheet" href="/styles.css" />
<style>
{CSS}
</style>
Expand Down
3 changes: 3 additions & 0 deletions static/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
7 changes: 7 additions & 0 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { type Config } from "tailwindcss";

export default {
content: [
"{routes,islands,components}/**/*.{ts,tsx}",
],
} satisfies Config;
4 changes: 2 additions & 2 deletions utils/posts.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { extract } from "$std/encoding/front_matter.ts";
import { extract } from "$std/front_matter/any.ts";

export interface Post {
slug: string;
Expand Down Expand Up @@ -37,4 +37,4 @@ export async function listPosts(): Promise<Post[]> {
const posts = await Promise.all(promises) as Post[];
posts.sort((a, b) => b.publishedAt.getTime() - a.publishedAt.getTime());
return posts;
}
}