Portfolio Structure
Portfolio items are located in the~/workspace/source/portfolio/ directory. Each item has its own folder with a standardized structure:
Creating a New Portfolio Item
1. Create the Directory
Create a new folder inportfolio/ with a descriptive, URL-friendly name:
2. Create the HTML File
Each portfolio item uses a minimal HTML structure with dynamic loading:portfolio/your-project-name/index.html
- The HTML file only contains two script tags
load-basics.jsloads the site’s core components (navigation, footer, etc.)portfolio-loader.jsloads the portfolio item template and structure- All paths are relative to the portfolio item location
3. Add to Portfolio Data
Register your portfolio item in the portfolio grid system by adding it to theportfolioData array in shared/components/index-portfolio/portfolio-grid.js:
shared/components/index-portfolio/portfolio-grid.js
Portfolio Card Structure
The portfolio grid automatically generates cards from the data. Here’s the HTML structure that gets created:Portfolio Disciplines
The system supports four main disciplines:| Discipline | Label | Description |
|---|---|---|
brands | Klef Brands | Branding and identity projects |
dev | Klef Dev | Web development and digital products |
studio | Klef Studio | Multimedia and video content |
strategy | Klef Strategy | Marketing and business strategy |
Filtering System
The portfolio grid includes a powerful filtering system defined inportfolio-grid.js:218:
Portfolio Template Structure
The portfolio item template is located inshared/components/portfolio/index.html and includes:
- Top Navigation: Breadcrumbs and view controls
- Cover Section: Hero image and project metadata
- Tabs Navigation: Sticky navigation for sections
- Main Content: Dynamic sections loaded from markdown
- SEO Images: Hidden container for search engine optimization
shared/components/portfolio/index.html:36-116 for the complete structure.
Best Practices
- Naming Convention: Use lowercase with hyphens for folder names (e.g.,
project-name-description) - Images: Store portfolio images in
assets/images/portfolio/ - Unique IDs: Ensure each portfolio item has a unique ID in the data array
- SEO: Include descriptive titles and extracts for better search visibility
- Categories: Use existing category tags when possible for consistent filtering
Related Files
- Portfolio Grid System:
shared/components/index-portfolio/portfolio-grid.js - Portfolio Loader:
shared/components/portfolio/portfolio-loader.js - Portfolio Template:
shared/components/portfolio/index.html - Cover Hydrator:
shared/components/portfolio/cover-hydrator.js

