From 1f7dd6163b7ae60eb3775019d6797818a4bcc4f6 Mon Sep 17 00:00:00 2001
From: sorakor0830 <khawsora@gmail.com>
Date: Mon, 12 Jun 2023 18:06:59 +0800
Subject: [PATCH] feat(init): make project name as default header title

---
 init.ts         | 4 ++--
 src/dev/deps.ts | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/init.ts b/init.ts
index 068627b8e21..57eda3e5274 100644
--- a/init.ts
+++ b/init.ts
@@ -1,4 +1,4 @@
-import { join, parse, resolve } from "./src/dev/deps.ts";
+import { basename, join, parse, resolve } from "./src/dev/deps.ts";
 import { error } from "./src/dev/error.ts";
 import { collect, ensureMinDenoVersion, generate } from "./src/dev/mod.ts";
 import {
@@ -115,7 +115,7 @@ export default function Home() {
   return (
     <>
       <Head>
-        <title>Fresh App</title>
+        <title>${basename(resolvedDirectory)}</title>
       </Head>
       <div${useTwind ? ` class="p-4 mx-auto max-w-screen-md"` : ""}>
         <img
diff --git a/src/dev/deps.ts b/src/dev/deps.ts
index b25b6ea7e1f..8b169089b9e 100644
--- a/src/dev/deps.ts
+++ b/src/dev/deps.ts
@@ -1,5 +1,6 @@
 // std
 export {
+  basename,
   dirname,
   extname,
   fromFileUrl,