Portfolio Pipeline Documentation
Portfolio Pipeline Documentation
This document explains the portfolio management system for the Open Access Policies website.
Overview
The portfolio items have been refactored from inline HTML in index.md to a maintainable system using:
- Data-driven approach: Portfolio items stored in
_data/portfolio.yml - Jekyll includes: Templated rendering via
_includes/portfolio-grid.html - GitHub Actions: Automatic deployment pipeline
File Structure
├── _data/portfolio.yml # YAML data for portfolio items
├── _includes/portfolio-grid.html # Template for rendering portfolio grid
├── .github/workflows/pages.yml # GitHub Actions workflow for deployment
└── build.sh # Local build script
How It Works
1. Data Source
The system uses _data/portfolio.yml as the single source of truth for portfolio items.
2. YAML Format
Portfolio items in _data/portfolio.yml follow this structure:
portfolio_items:
- title: "Item Title"
description: "Description text"
image: "/path/to/image.jpg"
link: "https://example.com"
gradient: "linear-gradient(135deg, #color1, #color2)"
Local Development
Prerequisites
- Ruby (3.1+)
- Bundler gem
Setup
- Install dependencies:
bundle install - Build the site:
./build.sh - Serve locally:
bundle exec jekyll serve
Adding Portfolio Items
Edit _data/portfolio.yml and add your item to the portfolio_items array following the YAML structure above.
Deployment
The site uses GitHub Actions for automatic deployment:
- Trigger: Push to
mainbranch - Workflow:
.github/workflows/pages.yml - Output: GitHub Pages site
Manual Deployment
You can also deploy manually:
- Build locally:
./build.sh - Push
_sitecontents to your hosting provider
Customization
Styling
The portfolio grid styling is in _includes/portfolio-grid.html. Key CSS classes:
.portfolio-grid: Main grid container.portfolio-item: Individual portfolio item.portfolio-item:hover: Hover effects
Layout
Grid layout is responsive and uses CSS Grid:
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))- Automatically adjusts to screen size
- 2rem gap between items
Plugin Customization
Since the system now uses only YAML data, no custom plugins are needed. The portfolio data is directly accessible via Jekyll’s data system.
Troubleshooting
Build Issues
- Plugin not working: Ensure
_pluginsdirectory is included in your repository - Styles not loading: Check that CSS is properly included in your layout
- Images not showing: Verify image paths are correct and files exist
GitHub Pages Issues
- Permissions: Ensure your repository has Pages enabled and proper permissions set.
Local Development Issues
- Bundle install fails: Ensure you have Ruby 3.1+ installed
- Jekyll serve fails: Check for syntax errors in your files
- Changes not reflecting: Try clearing Jekyll cache:
bundle exec jekyll clean
Benefits of This Approach
- Simplicity: Single YAML file as source of truth
- Maintainability: Easy to add/edit portfolio items
- GitHub Pages Compatible: No custom plugins required
- Separation of Concerns: Content separated from presentation
- Version Control Friendly: Changes are easier to track
- Automation: Automatic deployment via GitHub Actions