A modern, static site generator for your personal website. This replaces the Flask-based server with a simple Python build script that generates static HTML files.
- ✅ Static Site Generation - No server needed, just HTML files
- ✅ Modern Design - Clean, responsive design with improved typography
- ✅ Blog Support - Easy markdown-based blog posts
- ✅ Projects Page - Showcase your work with a beautiful grid layout
- ✅ Papers Page - Improved styling for your publications
- ✅ Cheap Hosting - Deploy to GitHub Pages, Netlify, or Vercel for free
njwfish/
├── static/ # Source files
│ ├── about.md # About page content
│ ├── posts/ # Blog posts (each in its own folder)
│ ├── css/ # Stylesheets
│ ├── js/ # JavaScript
│ └── ...
├── templates/ # Jinja2 templates
├── talks.json # Talks metadata
└── ...
site/ # Generated static site (output)
With conda environment:
conda activate website-build
python3 build.pyOr use the helper script:
./build.shWithout conda:
python3 build.pyThis will:
- Read all markdown files and templates
- Convert markdown to HTML
- Generate static HTML files in the
site/directory - Copy static assets (CSS, JS, images, etc.)
- Create a new folder in
njwfish/static/posts/(e.g.,my-new-post/) - Create three files:
title- The post titleblurb- A short descriptionmain.mdormain.html- The post content
Example:
njwfish/static/posts/my-new-post/
├── title
├── blurb
└── main.md
Papers are automatically fetched from Google Scholar when you run build.py. To manually update:
python3 fetch_scholar.pyOr edit njwfish/papers.json directly. The CV will automatically update with all papers from papers.json.
Edit njwfish/talks.json:
[
{
"title": "My Talk Title",
"venue": "Conference Name",
"location": "City, Country",
"date": "2024",
"slides": "/static/slides/my-slides.pdf",
"video": "https://...",
"links": []
}
]- Push the
site/directory to agh-pagesbranch - Enable GitHub Pages in your repo settings
Or use GitHub Actions to auto-build on push.
- Install Netlify CLI:
npm install -g netlify-cli - Build command:
python3 build.py - Publish directory:
site - Deploy:
netlify deploy --prod
- Install Vercel CLI:
npm install -g vercel - Build command:
python3 build.py - Output directory:
site - Deploy:
vercel --prod
After building, you can serve the site locally:
# Using Python
cd site
python3 -m http.server 8000
# Or using Node.js
npx serve siteThen visit http://localhost:8000
- Python 3.6+ (Python 3.9 recommended)
markdownpackagejinja2package
Conda (Recommended):
conda env create -f environment.yml
conda activate website-buildpip:
pip install markdown jinja2The old Flask app is still in njwfish/njwfish.py and njwfish/core.py. You can:
- Keep it for reference
- Delete it once you've migrated
- Run both in parallel during transition
The new system uses the same content structure, so your posts will work immediately.
- Colors: Edit CSS variables in
njwfish/static/css/main.css - Layout: Modify templates in
njwfish/templates/ - Styling: Update CSS in
njwfish/static/css/main.css
- Posts are sorted by modification date (newest first)
- The build script preserves your existing post structure
- All static assets are copied to the
site/directory - The site is fully static - no server-side code needed