Skip to content

Commit

Permalink
update in config
Browse files Browse the repository at this point in the history
  • Loading branch information
ctxnn committed Oct 31, 2024
1 parent f7b51da commit 94d92b5
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 19 deletions.
10 changes: 5 additions & 5 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import rehypeKatex from 'rehype-katex';
import remarkGfm from 'remark-gfm';

export default defineConfig({
site: 'https://yourusername.github.io',
output: 'static', // Explicitly set static output
site: 'https://ctxnn.github.io',
markdown: {
remarkPlugins: [remarkMath, remarkGfm],
rehypePlugins: [rehypeKatex],
Expand All @@ -14,8 +13,9 @@ export default defineConfig({
wrap: true
}
},
trailingSlash: 'always', // Helps with GitHub Pages routing
build: {
format: 'file' // Ensures proper file-based routing
vite: {
define: {
'process.env.FAVICON_URL': JSON.stringify('https://i.pinimg.com/564x/6f/e1/d0/6fe1d074ab0c081b5291d17ff88e3f03.jpg')
}
}
});
11 changes: 7 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ export const SITE = {
name: 'Chirag',
title: 'Chirag - ML Engineer',
description: "Chirag's personal website",
japanese: '光', // your name in Japanese if you want to keep that style
// Add these flags
japanese: '光',
workInProgress: {
blog: true, // Set to false when blog is ready
notes: true // Set to false when notes are ready
blog: true,
notes: true
},
wipMessages: {
blog: "🚧 Crafting thoughtful blog posts... coming soon!",
notes: "📚 Building my digital garden... stay tuned!"
}
};
12 changes: 10 additions & 2 deletions src/pages/blog.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const sortedPosts = posts.sort((a, b) =>
<Layout title="Blog - Chirag">
<h1>things i write</h1>

{SITE.workInProgress.blog ? (
<p class="wip-message">writing blogsss... work in progress</p>
{SITE.workInProgress?.blog ? (
<p class="wip-message">{SITE.wipMessages?.blog || "Coming soon..."}</p>
) : (
<section class="blog-posts">
{sortedPosts.map((post) => (
Expand All @@ -37,5 +37,13 @@ const sortedPosts = posts.sort((a, b) =>
.wip-message {
color: #64748b;
font-style: italic;
text-align: center;
padding: 2rem;
background: #f8fafc;
border-radius: 8px;
}
.blog-posts {
display: grid;
gap: 2rem;
}
</style>
15 changes: 7 additions & 8 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
import Layout from '../layouts/Layout.astro';
import { SITE } from '../config';
---

<Layout title="0_0">
<Layout title={SITE.title}>
<div class="intro">
<h1>yo my name is <span class="highlight">chirag</span>!</h1>
<!-- <p>i am an undergrad majoring in robotics and ai!</p> -->
Expand All @@ -27,20 +28,18 @@ import Layout from '../layouts/Layout.astro';
</ul>
</section>

<section class="connect">
<section>
<h2>let's connect</h2>
<ul>
<li>
<a href="https://x.com/ctxneja" target="_blank">twitter</a>
</li>
<!-- <li>
<a href="https://github.com/yourusername" target="_blank">github</a>
</li> -->
<!-- <li>
<a href="mailto:[email protected]">mail</a>
</li> -->
</ul>
</section>

{SITE.workInProgress.notes && (
<p class="wip-message">{SITE.wipMessages.notes}</p>
)}
</Layout>

<style>
Expand Down

0 comments on commit 94d92b5

Please sign in to comment.