Skip to content

Commit 1b9f1d3

Browse files
authored
Convert site to Astro (#9)
* Remove old site source * Add blog article draft * Initialize Astro Starter Kit: Blog * Load styles and content of old homepage * Clean up template artifacts * Load UoL blog article * Replace favicon * Add FontAwesome * Update body font-family to use variable for consistency * Remove placeholder images * Remove placeholder images * Don't show draft posts in production * Delete placeholder blog posts * Add Google Analytics tracking script * Disable header and footer elements * Move blog styles to LESS files * Restore resume page * Add a custom OG placeholder image * Remove redundant files * Code review fixes * Add back starter kit variables * Update agent instructions * Code review tweaks * Add deploy workflow * Remove LinkedIn post article * Give each blog article its own directory * Add article from 2017 * Allow articles to specify custom canonical URLs * Update resume
1 parent 6d493a9 commit 1b9f1d3

59 files changed

Lines changed: 5752 additions & 13341 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/copilot-instructions.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Valentin.io - Copilot Agent Instructions
2+
3+
## Project Summary
4+
This is a personal website for Valentin Radulescu, a front-end developer. It's a hybrid between a portfolio, blog, work history and resume. The goal is to paint a picture of my skills, personality and work style to potential employers or other developers.
5+
6+
## Project Scope and Goals
7+
8+
- Favor barebones, durable development. Prefer semantic HTML, plain CSS, and
9+
standard browser APIs over adding frameworks, libraries, or build-time
10+
abstractions when the platform can provide the same result.
11+
- Keep the site easy to understand and maintain years from now. Every new
12+
dependency or tool should have a clear benefit that justifies its long-term
13+
maintenance and upgrade cost.
14+
- Use Astro and the existing toolchain where they already fit the project, but
15+
avoid introducing framework-specific complexity for small features. Choose
16+
portable solutions and make upgrades deliberate rather than routine.
17+
18+
## Review Guidelines
19+
### Skip Low-Value Feedback
20+
21+
In general do NOT comment or suggest fixes for low-priority or low-value issues.
22+
23+
Do not comment on these unless they cause an error:
24+
- Import order, unused imports
25+
- Style or formatting
26+

‎.github/workflows/deploy.yml‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
concurrency:
13+
group: pages
14+
cancel-in-progress: true
15+
16+
jobs:
17+
deploy:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Check out source
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 22.12.0
28+
cache: npm
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build site
34+
run: npm run build
35+
36+
- name: Publish to gh-pages
37+
uses: peaceiris/actions-gh-pages@v4
38+
with:
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
publish_branch: gh-pages
41+
publish_dir: ./dist
42+
cname: valentin.io

‎.gitignore‎

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
1-
node_modules
2-
.cache/
3-
# Build directory
4-
public/
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
521
.DS_Store
6-
yarn-error.log
7-
tools/deploy-config.json
22+
23+
# jetbrains setting folder
24+
.idea/

‎.gitpod.yml‎

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

‎.vscode/extensions.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
3+
"unwantedRecommendations": []
4+
}

‎.vscode/launch.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

‎AGENTS.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Development
2+
3+
### Longevity and Simplicity
4+
5+
This site should follow a barebones development philosophy so it remains
6+
maintainable over many years. Prefer semantic HTML, plain CSS, and standard
7+
browser APIs whenever they are sufficient. Keep JavaScript, dependencies, and
8+
framework-specific abstractions to a minimum, and add a package or tool only
9+
when its benefits clearly outweigh its long-term maintenance and upgrade cost.
10+
11+
Use the existing Astro setup pragmatically, but do not introduce additional
12+
frameworks or unnecessary layers for small features. Favor portable, easily
13+
understood solutions and deliberate upgrades over keeping up with a fast-moving
14+
ecosystem.
15+
16+
When starting the dev server, use background mode:
17+
18+
```
19+
astro dev --background
20+
```
21+
22+
Manage the background server with `astro dev stop`, `astro dev status`, and `astro dev logs`.
23+
24+
## Documentation
25+
26+
Full documentation: https://docs.astro.build
27+
28+
Consult these guides before working on related tasks:
29+
30+
- [Adding pages, dynamic routes, or middleware](https://docs.astro.build/en/guides/routing/)
31+
- [Working with Astro components](https://docs.astro.build/en/basics/astro-components/)
32+
- [Using React, Vue, Svelte, or other framework components](https://docs.astro.build/en/guides/framework-components/)
33+
- [Adding or managing content](https://docs.astro.build/en/guides/content-collections/)
34+
- [Adding styles or using Tailwind](https://docs.astro.build/en/guides/styling/)
35+
- [Supporting multiple languages](https://docs.astro.build/en/guides/internationalization/)

‎README.md‎

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,65 @@
1-
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/RadValentin/valentin.io)
1+
# valentin.io
22

33
![Welcome to my homepage](https://i.imgur.com/YRJL0bj.gif)
44

5-
## Notes
5+
```sh
6+
npm create astro@latest -- --template blog
7+
```
68

7-
If you're on Windows, please run `npm install windows-build-tools -g` from PowerShell with admin rights before installing the npm dependencies [[read more]](https://www.gatsbyjs.org/docs/gatsby-on-windows/).
9+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
10+
11+
Features:
12+
13+
- ✅ Minimal styling (make it your own!)
14+
- ✅ 100/100 Lighthouse performance
15+
- ✅ SEO-friendly with canonical URLs and Open Graph data
16+
- ✅ Sitemap support
17+
- ✅ RSS Feed support
18+
- ✅ Markdown & MDX support
19+
20+
## 🚀 Project Structure
21+
22+
Inside of your Astro project, you'll see the following folders and files:
23+
24+
```text
25+
├── public/
26+
├── src/
27+
│   ├── assets/
28+
│   ├── components/
29+
│   ├── content/
30+
│   ├── layouts/
31+
│   └── pages/
32+
├── astro.config.mjs
33+
├── README.md
34+
├── package.json
35+
└── tsconfig.json
36+
```
37+
38+
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
39+
40+
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
41+
42+
The `src/content/` directory contains "collections" of related Markdown and MDX documents. Use `getCollection()` to retrieve posts from `src/content/blog/`, and type-check your frontmatter using an optional schema. See [Astro's Content Collections docs](https://docs.astro.build/en/guides/content-collections/) to learn more.
43+
44+
Any static assets, like images, can be placed in the `public/` directory.
45+
46+
## 🧞 Commands
47+
48+
All commands are run from the root of the project, from a terminal:
49+
50+
| Command | Action |
51+
| :------------------------ | :----------------------------------------------- |
52+
| `npm install` | Installs dependencies |
53+
| `npm run dev` | Starts local dev server at `localhost:4321` |
54+
| `npm run build` | Build your production site to `./dist/` |
55+
| `npm run preview` | Preview your build locally, before deploying |
56+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
57+
| `npm run astro -- --help` | Get help using the Astro CLI |
58+
59+
## 👀 Want to learn more?
60+
61+
Check out [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
62+
63+
## Credit
64+
65+
This theme is based off of the lovely [Bear Blog](https://github.com/HermanMartinus/bearblog/).

‎astro.config.mjs‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// @ts-check
2+
3+
import mdx from '@astrojs/mdx';
4+
import sitemap from '@astrojs/sitemap';
5+
import { defineConfig, fontProviders } from 'astro/config';
6+
7+
// https://astro.build/config
8+
export default defineConfig({
9+
site: 'https://valentin.io/',
10+
integrations: [mdx(), sitemap()],
11+
fonts: [
12+
{
13+
provider: fontProviders.local(),
14+
name: 'Atkinson',
15+
cssVariable: '--font-atkinson',
16+
fallbacks: ['sans-serif'],
17+
options: {
18+
variants: [
19+
{
20+
src: ['./src/assets/fonts/atkinson-regular.woff'],
21+
weight: 400,
22+
style: 'normal',
23+
display: 'swap',
24+
},
25+
{
26+
src: ['./src/assets/fonts/atkinson-bold.woff'],
27+
weight: 700,
28+
style: 'normal',
29+
display: 'swap',
30+
},
31+
],
32+
},
33+
},
34+
],
35+
});

‎gatsby-config.js‎

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

0 commit comments

Comments
 (0)