A modern, responsive portfolio website template built with Astro, TypeScript, and CSS. Features a clean design with dark/light mode support, project showcases, and smooth animations.
Before you begin, ensure you have the following installed on your system:
- Clone the repository
git clone https://github.com/xathail/portfolio-template.git
cd portfolio
- Install dependencies
npm install
- Start the development server
npm run dev
The site will be available at http://localhost:4321
To create a production build:
npm run build
To preview the production build:
npm run preview
This template is configured to work with Cloudflare Pages out of the box. To deploy:
-
Push your code to a GitHub repository
-
Log in to the Cloudflare dashboard and go to "Pages"
-
Click "Create a project" and select "Connect to Git"
-
Select your repository and click "Begin setup"
-
Configure your build settings:
- Framework preset: Astro
- Build command:
npm run build
- Build output directory:
dist
- Environment variables (optional):
NODE_VERSION
:16
or higher
-
Click "Save and Deploy"
Your site will be deployed to a .pages.dev
domain. You can also configure a custom domain in the Cloudflare Pages settings.
If you need to configure environment variables:
- Go to your project in Cloudflare Pages
- Navigate to Settings > Environment variables
- Add your variables for both Production and Preview environments
- If you encounter build errors, ensure your Node.js version is 16 or higher
- Check the build logs in Cloudflare Pages for detailed error messages
- Make sure all dependencies are properly listed in
package.json
├── public/ # Static assets (images, PDFs)
│ └── projects/ # Project-specific assets
├── src/
│ ├── assets/ # CSS and TypeScript assets
│ ├── components/ # Reusable Astro components
│ ├── data/ # Project and profile data
│ ├── layouts/ # Page layouts
│ ├── pages/ # Route pages
│ └── utils/ # Utility functions
├── astro.config.mjs # Astro configuration
├── package.json # Project dependencies
└── tsconfig.json # TypeScript configuration
Edit src/data/profile.ts
to update:
- Contact information (name, email, social links)
- Hero section text (greeting, title, tagline)
- About section bio
- Experience history (roles, companies, achievements)
- Education history (degrees, schools, details)
Edit src/data/projects.ts
to:
- Add your own projects
- Include project images, links, and details
- Configure featured projects
- Add documentation and demos
- Global styles are in
src/assets/
- Component-specific styles are in their respective
.astro
files - Theme variables can be modified in the CSS files
- 🌙 Dark/Light mode toggle
- 📱 Fully responsive design
- 🎯 SEO optimised
- ⚡ Fast page loads with Astro
- 🖼️ Project gallery with modal view
- 📄 Project documentation support
- 💻 Clean, modern UI
- 🎨 Customisable styling
- 🔄 Smooth page transitions
- Built with Astro for static site generation
- TypeScript for type safety
- Pure CSS for styling (no external UI libraries)
- CSS custom properties for theming
- Image optimisation handled by Astro
The website is optimised for modern browsers:
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Contributions are welcome! Please feel free to submit a Pull Request.
Distributed under the MIT License. See LICENSE
for more information.