Publications Page Generator
This tool generates a Jekyll markdown page for publications with interactive tag filtering functionality.
Features
- Interactive Tag Filtering: Click tags to filter papers (OR logic - shows papers matching any selected tag)
- Color-Coded Tags: Each tag is assigned a unique Pantone pastel color
- Priority Tags: AI, Medical, and XR tags appear first, followed by other tags alphabetically
- Visual Tag Display: Tags are displayed both as filter buttons and on each paper
Requirements
- Python 3.x
- pandas
- openpyxl (for reading Excel files)
Install dependencies:
pip install pandas openpyxl
Usage
1. Prepare Your Data
- Place your publication images in
assets/img/ - Place your PDF files in
assets/publications/ - Update
publications.xlsxwith your publication data
2. Excel File Format
The Excel file should have the following columns:
TITLE: Paper titleAUTHORS: Comma-separated list of authorsVENUE: Publication venueYEAR: Publication yearIMG: Image filename (should be inassets/img/)PAPER_NAME: PDF filename (should be inassets/publications/)YOUTUBE: YouTube video URL (optional)- Last column: Tags (comma-separated, e.g., “AI, Medical, XR”)
3. Generate the Page
Option A: Using Python script (recommended)
cd markdown_gen
python pub_gen.py
Option B: Using Jupyter notebook
- Open
pub_gen.ipynbin Jupyter - Run the generator cell
- The output file
pubs.mdwill be generated in the parent directory
4. Test Locally
# Install Jekyll dependencies (if needed)
bundle install
# Start Jekyll server
bundle exec jekyll serve
# or
jekyll serve
Visit http://localhost:4000/pubs.html to view the page.
5. Commit to GitHub
After testing, commit the changes:
git add pubs.md
git commit -m "Update publications page"
git push
Configuration
You can customize the following in the notebook:
- Priority Tags: Modify
PRIORITY_TAGSto change which tags appear first - Color Palette: Modify
PANTONE_COLORSto change tag colors - Output File: Change
OUTPUT_FILEto generate a different filename
Tag Colors
The following Pantone colors are used:
- Pantone 698 C – blush pink (#F2D4D7)
- Pantone 9160 C – soft peach (#F5D5C8)
- Pantone 607 C – pale yellow (#F5E6A3)
- Pantone 628 C – pastel aqua (#B8E2D8)
- Pantone 552 C – lavender blue (#C4C5E8)
- Pantone 7436 C – pale lilac (#E6D4E8)
- Pantone 7457 C – powder blue (#B8D4E8)
- Pantone 7470 C – soft mint (#C8E6D4)
- Pantone 9040 C – light coral (#F5C4B8)
- Pantone 9064 C – pastel sage (#D4E6D4)
Each tag is assigned a color consistently based on its name (using hash function).
How It Works
- Data Extraction: Reads the Excel file and extracts publication data and tags
- Tag Processing: Sorts tags with priority tags first, then alphabetically
- Color Assignment: Assigns consistent colors to each tag
- HTML Generation: Generates HTML with:
- Tag filter buttons at the top
- CSS styling for tags and filtering
- Table with publication entries
- JavaScript for interactive filtering
- Output: Writes the generated markdown file
Troubleshooting
Tags not showing up
- Ensure the last column in Excel contains comma-separated tags
- Check that tags are not empty or just whitespace
Colors not displaying
- Verify that the color hex codes are correct
- Check browser console for any JavaScript errors
Filtering not working
- Ensure JavaScript is enabled in your browser
- Check that the generated HTML includes the JavaScript section
Notes
- Table style can be customized in
assets/css/beautifuljekyll.css - The generator automatically bolds “Tim Chen” in author lists
- Empty tag cells are handled gracefully (papers without tags won’t break)