Skip to content

Commit a0cd0eb

Browse files
update astro dependency
1 parent a8feaa9 commit a0cd0eb

File tree

10 files changed

+3676
-7303
lines changed

10 files changed

+3676
-7303
lines changed

.prettierrc

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

README.md

Lines changed: 81 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,124 @@
1-
# Sofia Silva - Portfolio Website
1+
# literallysofia.github.io
22

3-
A personal portfolio website built with Astro + React, showcasing my work as a software engineer.
3+
Personal portfolio website built with [Astro](https://astro.build), showcasing my work as a software engineer and designer. ✨
44

5-
## Tech Stack
5+
🔗 **Live:** [literallysofia.github.io](https://literallysofia.github.io)
66

7-
- **Framework:** Astro 4.x
8-
- **UI Library:** React 18 (Islands Architecture)
9-
- **Styling:** Vanilla CSS with CSS Custom Properties
10-
- **Deployment:** GitHub Actions → GitHub Pages
11-
- **Image Optimization:** Astro Image + Sharp
7+
## 🛠️ Tech Stack
128

13-
## Key Features
9+
| Layer | Technology |
10+
|-------|-----------|
11+
| Framework | Astro 5.x |
12+
| Styling | Vanilla CSS + Custom Properties |
13+
| Images | Astro Image + Sharp |
14+
| Deployment | GitHub Actions → GitHub Pages |
1415

15-
- ⚡ Fast static site generation with minimal JavaScript
16-
- 🎨 Dark/light mode toggle with localStorage persistence
17-
- 📱 Fully responsive design
18-
- ♿ Accessible navigation and smooth scrolling
19-
- 🖼️ Optimized images with automatic WebP conversion
20-
- 🎭 CSS animations (no heavy animation libraries)
21-
- 🔧 Type-safe content collections
16+
## ⚡ Features
2217

23-
## Architecture Highlights
18+
- 🌗 Dark/light mode with `localStorage` persistence
19+
- 📱 Responsive design across all breakpoints
20+
- 🖼️ Optimized images with automatic WebP conversion and lazy loading
21+
- 🎨 CSS-only animations (no heavy libraries)
22+
- 🔒 Type-safe content collections with Zod schemas
23+
- 🔀 View transitions for smooth page navigation
24+
- 🔐 Optional password-protected access gate
25+
- 📄 Encrypted CV download (AES-256-GCM + PBKDF2)
26+
- 📜 Scroll-triggered timeline animations
2427

25-
### Dependency Minimalism
26-
Only **5 production dependencies** (79% reduction from previous Gatsby build):
27-
- `astro`
28-
- `react`
29-
- `react-dom`
30-
- `sharp` (for image optimization)
31-
- `@astrojs/react` (dev dependency)
32-
33-
### Component Strategy
34-
- **React Islands** (interactive): Header, MobileMenu, DarkModeToggle
35-
- **Astro Components** (static): Banner, About, Timeline, Portfolio, Footer
36-
- **SVG Icons** (inline): GitHub, LinkedIn, Behance, Link
37-
38-
## Project Structure
28+
## 📁 Project Structure
3929

4030
```
4131
/
42-
├── public/ # Static assets (favicon, etc.)
32+
├── .github/workflows/
33+
│ └── deploy.yml # GitHub Actions deployment
34+
├── public/ # Static assets (favicon, encrypted CV)
35+
├── scripts/
36+
│ └── encrypt-cv.mjs # CV encryption utility
4337
├── src/
44-
│ ├── assets/ # Images (processed by Astro)
38+
│ ├── assets/ # Images (processed by Astro)
4539
│ ├── components/
46-
│ │ ├── react/ # React island components
47-
│ │ ── icons/ # SVG icon components
48-
│ └── *.astro # Static Astro components
49-
│ ├── content/ # Content collections (markdown)
50-
│ │ ├── hero/
51-
│ │ ├── about/
52-
│ │ ├── experience/
53-
│ │ ├── extra-curricular/
54-
│ │ └── portfolio/
40+
│ │ ├── *.astro # Astro components
41+
│ │ ── icons/ # SVG icon components
42+
├── content/ # Content collections
43+
├── hero/ # Homepage hero
44+
│ │ ├── about/ # Education, languages
45+
│ │ ├── experience/ # Work timeline
46+
│ │ ├── extra-curricular/ # Volunteering, speaking
47+
│ │ ├── portfolio/ # Side projects
48+
│ │ └── *.md # Collection markdown files
5549
│ ├── layouts/
56-
│ │ └── Layout.astro
50+
│ │ └── Layout.astro # Base layout
5751
│ ├── pages/
58-
│ │ ├── index.astro
59-
│ │ └── 404.astro
60-
│ ├── styles/ # Vanilla CSS modules
61-
│ └── config.ts # Site configuration
52+
│ │ ├── index.astro # Home
53+
│ │ ├── about.astro # About
54+
│ │ ├── work.astro # Work experience
55+
│ │ ├── misc.astro # Extra-curricular & projects
56+
│ │ └── 404.astro # Not found
57+
│ ├── styles/ # CSS modules
58+
│ │ ├── theme.css # Design tokens & dark/light mode
59+
│ │ ├── global.css # Global styles
60+
│ │ ├── animations.css # Animation definitions
61+
│ │ └── ... # Component styles
62+
│ ├── content.config.ts # Collection schemas (glob loaders)
63+
│ └── config.ts # Site metadata
64+
├── astro.config.mjs
65+
├── tsconfig.json
6266
└── package.json
6367
```
6468

65-
## Development
69+
## 🚀 Development
6670

6771
### Prerequisites
68-
- Node.js 18.x or higher
69-
- npm 9.x or higher
72+
73+
- Node.js 18+
74+
- npm 9+
7075

7176
### Setup
7277

7378
```bash
7479
# Install dependencies
7580
npm install
7681

77-
# Start development server
78-
npm run dev
82+
# Copy environment variables
83+
cp .env.example .env
7984

80-
# Build for production
81-
npm run build
82-
83-
# Preview production build
84-
npm run preview
85+
# Start dev server
86+
npm run dev
8587
```
8688

87-
### Content Management
88-
89-
Content is managed through Astro Content Collections in the `src/content/` directory. Each collection has:
90-
- Type-safe schemas defined in `src/content/config.ts`
91-
- Markdown files with frontmatter for structured data
92-
- Automatic validation and TypeScript types
89+
### 📋 Available Scripts
9390

94-
To update content:
95-
1. Edit the markdown files in `src/content/{collection}/index.md`
96-
2. Follow the existing frontmatter structure
97-
3. Run `npm run dev` to see changes instantly
91+
| Script | Description |
92+
|--------|------------|
93+
| `npm run dev` | Start development server |
94+
| `npm run build` | Type-check and build for production |
95+
| `npm run preview` | Preview production build locally |
96+
| `npm run encrypt-cv` | Encrypt CV PDF (requires `CV_PASSWORD` env var) |
9897

99-
## Deployment
98+
### 🔑 Environment Variables
10099

101-
The site automatically deploys to GitHub Pages via GitHub Actions when you push to the `source` branch.
100+
See `.env.example` for available options:
102101

103-
### GitHub Pages Setup
102+
- `PUBLIC_SITE_PASSWORD` — password for the access gate
103+
- `PUBLIC_ENABLE_PASSWORD_GATE` — force-enable gate in dev mode
104+
- `CV_PASSWORD` — password for CV encryption/decryption
104105

105-
1. Go to repository Settings → Pages
106-
2. Set Source to "GitHub Actions"
107-
3. Push to `source` branch to trigger deployment
106+
### ✏️ Content Management
108107

109-
The workflow is defined in `.github/workflows/deploy.yml`.
108+
Content lives in `src/content/` as Markdown files with typed frontmatter. Schemas are defined in `src/content.config.ts`.
110109

111-
## Styling
110+
To update content, edit the Markdown files under the relevant collection directory and changes will reflect immediately in dev mode.
112111

113-
Uses vanilla CSS with CSS Custom Properties for:
114-
- Zero build dependencies for styles
115-
- Future-proof CSS that works forever
116-
- Easy theme customization via CSS variables
117-
- Responsive design with standard media queries
112+
## 🌐 Deployment
118113

119-
Theme variables are defined in `src/styles/theme.css`:
120-
```css
121-
:root {
122-
--font-playfair: "Playfair Display", serif;
123-
--color-primary: #c38352;
124-
--color-secondary: #71a7b2;
125-
/* ... */
126-
}
127-
```
128-
129-
## Browser Support
114+
Pushes to the `source` branch trigger a GitHub Actions workflow that builds and deploys to GitHub Pages.
130115

131-
- Chrome/Edge (last 2 versions)
132-
- Firefox (last 2 versions)
133-
- Safari (last 2 versions)
134-
- Mobile browsers (iOS Safari, Chrome Mobile)
116+
To set up:
135117

136-
## Performance
118+
1. Go to repository **Settings** → **Pages**
119+
2. Set Source to **GitHub Actions**
120+
3. Add `PUBLIC_SITE_PASSWORD` as a repository secret (if using the password gate)
137121

138-
- Lighthouse scores: 95+ performance, 100 accessibility/best-practices/SEO
139-
- Minimal JavaScript (< 150KB total, mostly React islands)
140-
- Optimized images with responsive srcsets
141-
- Fast initial page load with static HTML
142-
143-
## License
122+
## 📝 License
144123

145124
MIT
146-
147-
## Contact
148-
149-
- Email: sofialcfsilva@gmail.com
150-
- GitHub: [@literallysofia](https://github.com/literallysofia)
151-
- LinkedIn: [sofialcfsilva](https://www.linkedin.com/in/sofialcfsilva)
152-
153-
---
154-
155-
Built with [Astro](https://astro.build) and ❤️

astro.config.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { defineConfig } from 'astro/config';
2-
import react from '@astrojs/react';
32

43
// https://astro.build/config
54
export default defineConfig({
65
site: 'https://literallysofia.github.io',
7-
integrations: [react()],
86
});

0 commit comments

Comments
 (0)