Skip to content

Commit

Permalink
[feat]: improved seo
Browse files Browse the repository at this point in the history
  • Loading branch information
VineeTagarwaL-code committed Nov 2, 2024
1 parent bd64000 commit 63fb2fb
Show file tree
Hide file tree
Showing 16 changed files with 163 additions and 195 deletions.
3 changes: 0 additions & 3 deletions src/app/actions/blog.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ import rehypeHighlight from "rehype-highlight/lib";
import rehypeSlug from "rehype-slug";
import { SuccessResponse } from "@/lib/success";

export const blogsGet = async () => {
return { hi: "there" };
};
const getBlogs = withServerActionAsyncCatcher(async () => {
const response = await axios.get(
`https://api.github.com/repos/${process.env.GITHUB_USERNAME}/${process.env.GITHUB_REPO_NAME}/git/trees/main?recursive=1`,
Expand Down
3 changes: 3 additions & 0 deletions src/app/actions/tag.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { getBlogs } from "./blog.action";
import { SuccessResponse } from "@/lib/success";
import { ErrorHandler } from "@/lib/error";

/**
* v3 will have tags and tag filtering
*/
export const getTags = withServerActionAsyncCatcher(async () => {
const response = await getBlogs();
const blogs = response.additional.meta;
Expand Down
2 changes: 1 addition & 1 deletion src/app/blog/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Blogs } from "@/components/Blogs";
import { Heading } from "@/components/Heading";
import { BlurDiv } from "@/components/ui/Blur";
import { DELAY } from "@/constants/misc";
import { DELAY } from "@/lib/constants";

const BlogPage = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en">
<html lang="en" suppressHydrationWarning>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased min-h-screen bg-background font-sans max-w-2xl mx-auto py-12 sm:py-24 px-6 `}
>
Expand Down
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Blogs } from "@/components/Blogs";
import { Footer } from "@/components/Footer";
import { Heading } from "@/components/Heading";
import { BlurDiv } from "@/components/ui/Blur";
import { DELAY } from "@/constants/misc";
import { DELAY } from "@/lib/constants";
export default function Home() {
return (
<main className="flex flex-col min-h-[100dvh] mt-2 md:mt-16 scroll-smooth">
Expand Down
2 changes: 1 addition & 1 deletion src/components/About.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BlurDiv } from "./ui/Blur";
import { DELAY } from "@/constants/misc";
import { DELAY } from "@/lib/constants";
import Markdown from "react-markdown";
import { DATA } from "@/data/info";
import { GithubGraph } from "./ui/github";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Blogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Blog, BlogSkeleton } from "./cards/Blog-card";
import { NoPost } from "./cards/Blog-card";
import { Input } from "./ui/Input";
import { BlurDiv } from "./ui/Blur";
import { DELAY } from "@/constants/misc";
import { DELAY } from "@/lib/constants";

type blogProps = {
showMore?: boolean;
Expand Down
7 changes: 1 addition & 6 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ export const Footer = () => {
</h2>
<p className="max-w-2xl text-gray-400 text-lg">
Want to chat? Just shoot me a dm{" "}
<Link
href="https://twitter.com"
className="text-blue-500 hover:text-blue-400"
>
on twitter
</Link>{" "}
<Link href="https://twitter.com/vineetwts">on twitter</Link>
</p>
<Heading classname=" my-8">VINEET.TECH</Heading>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from "react";
export default function Navbar() {
return (
<Dock
navbar={DATA}
navbar={DATA.navbar}
mobileClassName="rounded-full z-50 cursor-pointer md:flex items-center pointer-events-auto bg-background [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_-2px_4px_rgba(0,0,0,.05),0_-12px_24px_rgba(0,0,0,.05)] transform-gpu dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_20px_80px_-20px_#ffffff1f_inset] "
DesktopClassName="hidden cursor-pointer rounded-full z-50 mx-auto md:flex min-h-full h-full items-center bg-background [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] transform-gpu dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] "
/>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Share-twitter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export default function ShareOnTwitter({
</p>
<Button
onClick={() => shareOnTwitter(twitter_username)}
className="bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-full flex items-center"
className=" text-white font-bold py-2 px-4 rounded-full flex items-center"
>
<Twitter className="mr-2 h-5 w-5" />
Follow on Twitter
Follow on twitter
</Button>
</div>
);
Expand Down
59 changes: 31 additions & 28 deletions src/components/cards/Blog-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,39 @@ import { Card, CardContent } from "@/components/ui/card";

export const Blog = (post: Meta) => {
return (
<Link href={`/blog/${post.id}`}>
<div className="hover:scale-[1.04] transition-all rounded-xl cursor-pointer bg-gray-400/20 dark:bg-stone-900/20 border-muted border-[1px] border-solid px-6 py-7 mb-6 relative z-40">
<h2 className="font-semibold text-2xl md:text-3xl relative group">
<TitleHover
imageLink={post.image}
width={200}
height={200}
url={`/blog/${post.id}`}
<div
onClick={() => {
window.location.href = `/blog/${post.id}`;
}}
className="hover:scale-[1.04] transition-all rounded-xl cursor-pointer bg-gray-400/20 dark:bg-stone-900/20 border-muted border-[1px] border-solid px-6 py-7 mb-6 relative z-40"
>
<h2 className="font-semibold text-2xl md:text-3xl relative group">
<TitleHover
imageLink={post.image}
width={200}
height={200}
url={`/blog/${post.id}`}
>
{post.title}
</TitleHover>
</h2>
<p className="text-lg md:text-xl mt-3 text-muted-foreground">
{post.description}
</p>
<p className="text-muted-foreground mt-4">
{getFormattedDate(post.date)} · Vineet Agarwal
</p>
<div>
{post.tags.map((tag: any) => (
<span
className="text-sm bg-gray-100 dark:bg-black border-solid border-[1px] border-muted dark:text-gray-200 text-gray-700 px-2 py-1 rounded-md mr-2 mt-2 inline-block"
key={tag}
>
{post.title}
</TitleHover>
</h2>
<p className="text-lg md:text-xl mt-3 text-muted-foreground">
{post.description}
</p>
<p className="text-muted-foreground mt-4">
{getFormattedDate(post.date)} · Vineet Agarwal
</p>
<div>
{post.tags.map((tag: any) => (
<span
className="text-sm bg-gray-100 dark:bg-black border-solid border-[1px] border-muted dark:text-gray-200 text-gray-700 px-2 py-1 rounded-md mr-2 mt-2 inline-block"
key={tag}
>
{tag}
</span>
))}
</div>
{tag}
</span>
))}
</div>
</Link>
</div>
);
};

Expand Down
4 changes: 2 additions & 2 deletions src/components/introduction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { BlurDiv } from "./ui/Blur";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/Avatar";
import { DATA } from "@/data/info";
import { DELAY } from "@/constants/misc";
import { DELAY } from "@/lib/constants";
type IntroductionProps = {
name: string;
desc: string;
Expand All @@ -26,7 +26,7 @@ export const Introduction = ({ name, desc }: IntroductionProps) => {
</div>
<BlurDiv delay={DELAY * 1.2} isView>
<Avatar className="size-28 border">
<AvatarImage src={DATA.image} />
<AvatarImage src={DATA.image} alt="image" />
<AvatarFallback>CN</AvatarFallback>
</Avatar>
</BlurDiv>
Expand Down
Loading

0 comments on commit 63fb2fb

Please sign in to comment.