Skip to content

Commit 721e74b

Browse files
committed
Optimize performance, SEO, and accessibility
- Migrate Lucide icons from CDN to npm package (lucide-astro) - Add lazy loading to images, optimize banner (1.6MB → 100KB) - Remove 9 unused image files (~2MB) - Add comprehensive SEO meta tags (Open Graph, Twitter Card, canonical URLs) - Create robots.txt and sitemap.xml - Improve accessibility (aria-labels, aria-expanded attributes) - Rewrite README with technical documentation - Remove production console.log statements
1 parent 76b45ee commit 721e74b

22 files changed

+183
-97
lines changed

README.md

Lines changed: 104 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,122 @@
1-
# Astro Starter Kit: Minimal
1+
# GreenFlux Portfolio
22

3-
```sh
4-
npm create astro@latest -- --template minimal
5-
```
3+
Portfolio website for GreenFlux, LLC (Joseph Petty) built with Astro 5 and Tailwind CSS v4.
4+
5+
**Live Site**: https://greenflux.github.io
66

7-
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
7+
## Technical Stack
88

9-
## 🚀 Project Structure
9+
- **Framework**: Astro 5 (Static Site Generation)
10+
- **Styling**: Tailwind CSS v4 (via Vite plugin)
11+
- **Icons**: lucide-astro
12+
- **Deployment**: GitHub Pages via GitHub Actions
13+
- **View Transitions**: Enabled globally for smooth navigation
1014

11-
Inside of your Astro project, you'll see the following folders and files:
15+
## Project Structure
1216

13-
```text
17+
```
1418
/
1519
├── public/
20+
│ ├── images/ # Static images
21+
│ ├── robots.txt # Search engine directives
22+
│ ├── sitemap.xml # Site structure for SEO
23+
│ └── favicon.svg # Site icon
1624
├── src/
17-
│ └── pages/
18-
│ └── index.astro
25+
│ ├── components/ # Astro components
26+
│ │ ├── Navigation.astro
27+
│ │ ├── Hero.astro
28+
│ │ ├── Portfolio.astro
29+
│ │ ├── About.astro
30+
│ │ ├── Social.astro
31+
│ │ └── Footer.astro
32+
│ ├── data/ # Content data (JSON)
33+
│ │ ├── portfolio.json # Portfolio items with metadata
34+
│ │ └── site.json # Site-wide content
35+
│ ├── layouts/
36+
│ │ └── Layout.astro # Base layout with SEO meta tags
37+
│ ├── pages/
38+
│ │ ├── index.astro # Main landing page
39+
│ │ └── portfolio/ # Portfolio detail pages
40+
│ └── styles/
41+
│ └── global.css # Global styles and CSS variables
42+
├── astro.config.mjs # Astro configuration
43+
├── tailwind.config.mjs # Tailwind configuration
44+
├── CLAUDE.md # Claude Code context file
1945
└── package.json
2046
```
2147

22-
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
48+
## Data-Driven Architecture
49+
50+
All content is separated from layout and stored in JSON files:
51+
52+
- `src/data/portfolio.json` - Portfolio project items
53+
- `src/data/site.json` - Site-wide content (about, social links, company info)
54+
55+
To add or modify content, edit these JSON files rather than modifying components.
56+
57+
## Development Commands
58+
59+
```bash
60+
npm install # Install dependencies
61+
npm run dev # Start dev server (http://localhost:4321)
62+
npm run build # Build for production (outputs to dist/)
63+
npm run preview # Preview production build locally
64+
```
65+
66+
## Deployment
2367

24-
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
68+
Automatic deployment via GitHub Actions on push to `main` branch:
2569

26-
Any static assets, like images, can be placed in the `public/` directory.
70+
1. Workflow runs `npm run build`
71+
2. Deploys `dist/` folder to GitHub Pages
72+
3. Site available at https://greenflux.github.io
2773

28-
## 🧞 Commands
74+
Workflow configuration: `.github/workflows/deploy.yml`
2975

30-
All commands are run from the root of the project, from a terminal:
76+
## Color Theme
77+
78+
Dark theme with green accents:
79+
80+
```css
81+
--color-dark: #0a0a0a /* Primary background */
82+
--color-darker: #000000 /* Darker sections */
83+
--color-green-primary: #00d600 /* Primary green accent */
84+
--color-green-bright: #00ff00 /* Bright green hover */
85+
--color-text-primary: #ffffff /* White text */
86+
--color-text-secondary: #a0a0a0 /* Gray text */
87+
```
88+
89+
## SEO Optimization
90+
91+
- Open Graph meta tags for social media sharing
92+
- Twitter Card meta tags
93+
- Canonical URLs
94+
- robots.txt for search engine crawlers
95+
- sitemap.xml for search indexing
96+
- Optimized images with lazy loading
97+
- Semantic HTML structure
98+
99+
## Adding Portfolio Items
100+
101+
Edit `src/data/portfolio.json` and add a new object to the `items` array:
102+
103+
```json
104+
{
105+
"id": "unique-id",
106+
"title": "Project Title",
107+
"path": "/portfolio/project-slug",
108+
"description": "Project description",
109+
"image": "/images/project.png",
110+
"tags": ["JavaScript", "API"]
111+
}
112+
```
31113

32-
| Command | Action |
33-
| :------------------------ | :----------------------------------------------- |
34-
| `npm install` | Installs dependencies |
35-
| `npm run dev` | Starts local dev server at `localhost:4321` |
36-
| `npm run build` | Build your production site to `./dist/` |
37-
| `npm run preview` | Preview your build locally, before deploying |
38-
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
39-
| `npm run astro -- --help` | Get help using the Astro CLI |
114+
For external links, use full URLs in `path`. For internal detail pages, create a new file in `src/pages/portfolio/`.
40115

41-
## 👀 Want to learn more?
116+
## Performance Optimizations
42117

43-
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
118+
- Lazy loading for below-the-fold images
119+
- Eager loading with fetchpriority="high" for critical images (logo, hero)
120+
- npm-based icon library (lucide-astro) instead of CDN
121+
- Optimized image formats and sizes
122+
- Minimal JavaScript footprint

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"dependencies": {
1212
"@tailwindcss/vite": "^4.1.16",
1313
"astro": "^5.15.3",
14+
"lucide-astro": "^0.552.0",
1415
"tailwindcss": "^4.1.16"
1516
}
1617
}

public/images/banner.png

-1.63 MB
Binary file not shown.
-72.5 KB
Binary file not shown.

public/images/filemaker.png

-26.7 KB
Binary file not shown.
-57.4 KB
Binary file not shown.

public/images/logo-tagline.png

-41.7 KB
Binary file not shown.

public/images/logo-tagline.svg

Lines changed: 0 additions & 22 deletions
This file was deleted.

public/images/profile.jpeg

-73.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)