Skip to content
Draft
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
13 changes: 2 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,5 @@ pnpm-debug.log*
# macOS-specific files
.DS_Store

# IntelliJ based IDEs
.idea
/shelf/
/workspace.xml
/httpRequests/
/mavenHomeManager.xml
/dataSources/
/dataSources.local.xml
*.iml

.wrangler/
# jetbrains setting folder
.idea/
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
coverage/
.pnpm-store/
pnpm-lock.yaml
package-lock.json
yarn.lock
19 changes: 19 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"endOfLine": "lf",
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 80,
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"],
"tailwindStylesheet": "src/styles/global.css",
"tailwindFunctions": ["cn", "cva"],
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
}
]
}
16 changes: 0 additions & 16 deletions .prettierrc.mjs

This file was deleted.

4 changes: 0 additions & 4 deletions .vscode/extensions.json

This file was deleted.

11 changes: 0 additions & 11 deletions .vscode/launch.json

This file was deleted.

38 changes: 31 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
# devarsh-website
# Astro + React + TypeScript + shadcn/ui

This is my personal website built with Astro! Go to [devarsh.me](https://devarsh.me) to check it out.
This is a template for a new Astro project with React, TypeScript, and shadcn/ui.

## Setup
## Adding components

You will need [Bun](https://bun.sh) installed.
To add components to your app, run the following command:

1. Install dependencies with `bun install --frozen-lockfile`
2. Run `bun run dev` to start the development server
```bash
npx shadcn@latest add button
```

The site is deployed on Cloudflare Pages. You can get the files to deploy with `bun run build`. If you want to change the adapter, you can do so following the official Astro documentation for the adapter you want.
This will place the ui components in the `src/components` directory.

## Using components

To use the components in your app, import them in an `.astro` file:

```astro
---
import { Button } from "@/components/ui/button"
---

<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Astro App</title>
</head>
<body>
<div class="grid h-screen place-items-center content-center">
<Button>Button</Button>
</div>
</body>
</html>
```
13 changes: 13 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// @ts-check

import tailwindcss from "@tailwindcss/vite"
import { defineConfig } from "astro/config"
import react from "@astrojs/react"

// https://astro.build/config
export default defineConfig({
vite: {
plugins: [tailwindcss()],
},
integrations: [react()],
})
13 changes: 0 additions & 13 deletions astro.config.mts

This file was deleted.

1,662 changes: 1,662 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

Binary file removed bun.lockb
Binary file not shown.
25 changes: 25 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "base-luma",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "",
"css": "src/styles/global.css",
"baseColor": "taupe",
"cssVariables": true,
"prefix": ""
},
"iconLibrary": "lucide",
"rtl": false,
"aliases": {
"components": "@/components",
"utils": "@/lib/utils",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/hooks"
},
"menuColor": "default-translucent",
"menuAccent": "subtle",
"registries": {}
}
28 changes: 28 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import js from "@eslint/js"
import globals from "globals"
import reactHooks from "eslint-plugin-react-hooks"
import reactRefresh from "eslint-plugin-react-refresh"
import tseslint from "typescript-eslint"
import { defineConfig, globalIgnores } from "eslint/config"

export default defineConfig([
globalIgnores(["dist", ".astro"]),
{
files: ["**/*.{ts,tsx}"],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
rules: {
"react-refresh/only-export-components": [
"off",
]
},
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
},
])
44 changes: 32 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,45 @@
{
"name": "devarsh-website",
"name": "devarshs-website",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"format": "prettier . --write"
"lint": "eslint .",
"format": "prettier --write \"**/*.{ts,tsx,astro}\"",
"typecheck": "astro check"
},
"dependencies": {
"@astrojs/check": "^0.9.4",
"@astrojs/cloudflare": "^12.6.2",
"@astrojs/rss": "^4.0.12",
"@lucide/astro": "^0.536.0",
"astro": "^5.12.8",
"typescript": "^5.9.2"
"@astrojs/react": "5.0.2",
"@base-ui/react": "^1.3.0",
"@fontsource-variable/instrument-sans": "^5.2.8",
"@tailwindcss/vite": "^4.2.1",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"astro": "6.1.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^1.7.0",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"shadcn": "^4.1.2",
"tailwind-merge": "^3.5.0",
"tailwindcss": "^4.2.1",
"tw-animate-css": "^1.4.0"
},
"devDependencies": {
"prettier": "^3.6.2",
"prettier-plugin-astro": "^0.14.1"
"@eslint/js": "^9.39.4",
"eslint": "^9.39.4",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.5.2",
"globals": "^16.5.0",
"prettier": "^3.8.1",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-tailwindcss": "^0.7.2",
"typescript": "~5.9.3",
"typescript-eslint": "^8.57.1"
}
}
3 changes: 3 additions & 0 deletions public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/fonts/Atkinson-Hyperlegible-Bold.woff2
Binary file not shown.
Binary file removed public/fonts/Atkinson-Hyperlegible-BoldItalic.woff2
Binary file not shown.
Binary file removed public/fonts/Atkinson-Hyperlegible-Italic.woff2
Binary file not shown.
Binary file removed public/fonts/Atkinson-Hyperlegible-Regular.woff2
Binary file not shown.
6 changes: 0 additions & 6 deletions public/humans.txt

This file was deleted.

3 changes: 0 additions & 3 deletions public/robots.txt

This file was deleted.

38 changes: 0 additions & 38 deletions src/components/BaseHead.astro

This file was deleted.

17 changes: 0 additions & 17 deletions src/components/FormattedDate.astro

This file was deleted.

26 changes: 0 additions & 26 deletions src/components/Giscus.astro

This file was deleted.

Loading