Personal Website Setup Guide
Personal Website Setup Guide
This guide explains how to populate your website with data from Google Sheets and deploy it to GitHub Pages.
Overview
Your personal academic website is built with Jekyll and automatically pulls data from your Google Sheet to generate pages for publications, talks, and teaching experience.
Google Sheet Setup
Your Google Sheet: https://docs.google.com/spreadsheets/d/1qT2tvmvXeUyYYCYgUag12yf7-nz8JGpkCI3bjUe9eEU/edit?usp=sharing
The sheet contains three tabs:
- cv-data: Your education, research positions, publications, presentations, teaching, references, and awards
- cv-info: Your contact information
- cv-skills: Your technical skills and proficiency levels
Important: Sheet Must Be Public
Make sure your Google Sheet is set to “Anyone with the link can view”:
- Click “Share” in Google Sheets
- Change from “Restricted” to “Anyone with the link”
- Set permission to “Viewer”
Updating Your Website
Step 1: Fetch Data from Google Sheets
cd /home/mustafa/mustafapir.github.io
python3 scripts/fetch_google_sheet.py
This downloads the latest data from your Google Sheet and saves it to the _data/ directory.
Step 2: Generate Website Content
python3 scripts/populate_website.py
This creates individual markdown files for each:
- Publication in
_publications/ - Talk/Presentation in
_talks/ - Teaching entry in
_teaching/
Step 3: Update Everything at Once
You can combine both steps:
python3 scripts/fetch_google_sheet.py && python3 scripts/populate_website.py
Building and Testing Locally
Using Docker (Recommended)
If you have Docker installed:
chmod -R 777 .
docker compose up
Then visit: http://localhost:4000
Using Jekyll Directly
- Install dependencies: ```bash
On Ubuntu/Debian
sudo apt install ruby-dev ruby-bundler nodejs
On macOS
brew install ruby node gem install bundler
2. Install Ruby gems:
```bash
bundle install
- Serve the site:
bundle exec jekyll serve -l -H localhost
Then visit: http://localhost:4000
Deploying to GitHub Pages
Initial Setup
- Push your repository to GitHub (if not already done):
git add . git commit -m "Initial commit with personalized content" git push origin main - Enable GitHub Pages:
- Go to your repository on GitHub: https://github.com/mustafapir/mustafapir.github.io
- Click “Settings” → “Pages”
- Under “Source”, select the branch (usually
mainormaster) - Click “Save”
- Wait for deployment:
- GitHub will automatically build and deploy your site
- This takes 1-5 minutes
- Your site will be available at: https://mustafapir.github.io
Updating Your Site
Whenever you update your Google Sheet:
- Fetch and regenerate content:
python3 scripts/fetch_google_sheet.py && python3 scripts/populate_website.py - Commit and push changes:
git add . git commit -m "Update content from Google Sheets" git push origin main - GitHub Pages will automatically rebuild your site (takes 1-5 minutes)
File Structure
mustafapir.github.io/
├── _config.yml # Site configuration
├── _data/ # CSV data from Google Sheets
│ ├── cv-data.csv
│ ├── cv-info.csv
│ └── cv-skills.csv
├── _pages/ # Main pages
│ ├── about.md # Home page
│ ├── cv.md # CV page
│ ├── publications.html
│ ├── talks.html
│ └── teaching.html
├── _publications/ # Generated publication files
├── _talks/ # Generated talk files
├── _teaching/ # Generated teaching files
└── scripts/
├── fetch_google_sheet.py # Fetches data from Google Sheets
└── populate_website.py # Generates markdown files
Customization
Update Personal Information
Edit _config.yml to update:
- Name and bio
- Social media links
- Email address
- Site title and description
Update Profile Picture
Replace images/profile.png with your own photo (recommended size: 300x300 pixels)
Edit About Page
Edit _pages/about.md to update your bio and research interests
Edit CV
Edit _pages/cv.md to customize the CV layout
Troubleshooting
Site not updating on GitHub Pages?
- Check the “Actions” tab in your GitHub repository to see build status
- Ensure your repository is named
mustafapir.github.io(your username + .github.io) - Clear your browser cache
Local build errors?
- Make sure all dependencies are installed:
bundle install - Try deleting
Gemfile.lockand runningbundle installagain - Check Ruby version:
ruby -v(should be 2.5+)
Google Sheets fetch failing?
- Verify the sheet is set to “Anyone with the link can view”
- Check your internet connection
- Ensure the sheet ID in
scripts/fetch_google_sheet.pyis correct
Automated Updates
Your website is configured to automatically update from your Google Sheet!
How It Works
A GitHub Actions workflow (.github/workflows/auto-update.yml) runs automatically:
- Schedule: Every day at 2 AM UTC
- Manual: You can trigger it anytime from GitHub
The workflow:
- Fetches latest data from your Google Sheet
- Regenerates publication, talk, and teaching files
- Commits and pushes changes (only if there are updates)
- GitHub Pages automatically rebuilds your site
Manual Trigger
To update immediately after editing your Google Sheet:
- Go to https://github.com/mustafapir/mustafapir.github.io/actions
- Click “Auto-update from Google Sheets” workflow
- Click “Run workflow” → “Run workflow”
- Wait 1-2 minutes for completion
Customize Update Frequency
Edit .github/workflows/auto-update.yml and change the cron schedule:
schedule:
- cron: '0 2 * * *' # Daily at 2 AM UTC
Common schedules:
'0 */6 * * *'- Every 6 hours'0 0 * * 0'- Every Sunday at midnight'0 9 * * 1-5'- Weekdays at 9 AM UTC
Check Workflow Status
View automation logs at: https://github.com/mustafapir/mustafapir.github.io/actions
Note: The first time you push this workflow, you may need to enable GitHub Actions in your repository settings.
Your website URL: https://mustafapir.github.io
For more help with the Academic Pages template, see: https://github.com/academicpages/academicpages.github.io
