A personal website and portfolio to showcase my skills, offer contact information and more.
Built with ASP.NET Core 10.0, Razor Pages, and Tailwind CSS as a statically generated site.
cd portfolio-aspnet
# Install npm dependencies for Tailwind
npm install
# Build Tailwind CSS
npm run build:css
# Run the development server
dotnet runVisit http://localhost:5000
This project uses a custom static site generator that leverages the ASP.NET Core test server to render pages.
To generate a static version of the site:
cd portfolio-aspnet
dotnet run -- ssgOr use the build script from the root:
./build.shportfolio-aspnet/- ASP.NET Core applicationPages/- Razor PagesPages/Shared/Components/- Reusable partial viewsModels/- Data models and site contentwwwroot/- Static assetswwwroot-static/- Generated static site (not in git)Styles/- Tailwind CSS sourceStaticSiteGenerator.cs- Custom SSG implementation
- ASP.NET Core 10.0 (Razor Pages)
- Tailwind CSS 3
- Custom Static Site Generator using Microsoft.AspNetCore.Mvc.Testing
The custom static site generator:
- Creates an in-memory test web server using ASP.NET Core TestHost
- Configures the server with the same Razor Pages pipeline as the main app
- Makes HTTP requests to each configured page
- Saves the rendered HTML to static files
- Copies all assets from
wwwroot/to the output directory
This approach ensures that the static output is identical to what the dynamic server would produce, while keeping the implementation simple and dependency-free.
The generated static files in wwwroot-static/ can be deployed to any static hosting service like:
- GitHub Pages
- Azure Static Web Apps
- Netlify
- AWS S3
Simply copy the contents of wwwroot-static/ to your hosting provider.