Install portfolio_generator.rb
in your plugins directory (_plugins
).
Set your config options:
portfolio_dir
- The directory in which the projects will be generated. Defaultsto portfolio
.
skip_related_projects
- If true
, it will not generate related projects foreach project. Defaults to false
.
related_project_keys
- An array of project keys that will be used to computerelated projects. This is required if you want to generate related projects.There is no default.
related_min_common
- As a decimal, the minimum percentage of keys that shouldbe common for a project to be considered related. Defaults to 0.6
.
_config.yml
:# ...
portfolio_dir: "projects"
related_project_keys: ["category", "technology"]
related_min_common: 0.7
# ...
Create a layout file named project.html
in your _layouts
folder that will be usedfor the project pages.
project.html
:<h2>{{ page.title }} <span>{{ page.category }}</span></h2>
<p>{{ page.description }}</p>
<ul>
{% for technology in page.technology %}
<li><a>{{ technology }}</a></li>
{% endfor %}
</ul>
The project page will have access to any keys you use in your project data files,so to access them you just need to use the page
variable (e.g. {{ page.KEY }}
).
This plugin assumes that the project data files will be inside a projects
directoryinside of the _data
directory. Each project must have its own file, and eachproject must have a key named title
.
Tokyo Drift Cats.yml
:
title: Tokyo Drift Cats
description: An illegal street racing game but with cats.
category: game development
technology:
- C++
- Git
If you want to include your projects in your index.html
or portfolio.html
,you can access your projects like this:
{% assign projects = site.data.projects | get_projects_from_files | sort:'date' %}
{% for project in projects reversed %}
<!-- portfolio-item -->
<h2>{{ project.title }} <span>{{ project.category | slugify }}</h2>
<a href="/{{ project.dir }}">
<img src="{{ project.image.url }}" alt="{{ project.image.alt }}" title="{{ project.image.title }}">
</a>
<!-- portfolio-item -->
{% endfor %}
This will show your projects with the most-recent being first (if you include the datein your project files). I recommend always using the get_projects_from_files
filter.Without it, you'll have to do this, and the projects won't be in reverse chronologicalorder:
{% for project_file in site.data.projects %}
{% assign project = project_file[1] %}
<!-- portfolio-item -->
<h2>{{ project.title }} <span>{{ project.category | slugify }}</h2>
<a href="/{{ project.dir }}">
<img src="{{ project.image.url }}" alt="{{ project.image.alt }}" title="{{ project.image.title }}">
</a>
<!-- portfolio-item -->
{% endfor %}
Related projects are generated for each project by computing the number of matchesbetween the projects and adding the projects as related if they are greater thanor equal to the minimum required. They are sorted such that the most relatedappear first.
Assuming this is in the project.html
layout file:
{% if page.related_projects.size > 0 %}
<h3>Related Projects</h3>
{% for project in page.related_projects %}
<a href="/{{ project.dir }} ">
<img src="{{ project.image.url }}" alt="{{ project.image.alt }}" title="{{ project.image.title }}">
</a>
{% endfor %}
{% endif %}
The plugin adds all related projects, so if a project has a lot of related projects,you might have to add a limit, like so:
{% if page.related_projects.size > 0 %}
<h3>Related Projects</h3>
{% for project in page.related_projects limit:3 %}
<a href="/{{ project.dir }} ">
<img src="{{ project.image.url }}" alt="{{ project.image.alt }}" title="{{ project.image.title }}">
</a>
{% endfor %}
{% endif %}
For more examples, check out the repofor codeinpink.github.io! The source code is inthe source
branch and the generated content is in the master
branch.
Portfolio Jekyll Theme This is a Jekyll theme built using the DevTips Starter Kit as a foundation for starting, and following closely the amazing tutorial by Travis Neilson over at DevTips. The purpos
Dhaval's Personal Portfolio and Notion Blog �� Live site dhavalsoneji.com �� Quick start Git clone this repo git clone ... Copy .env.sample to .env.local and add your GitHub PAT with repo scope, as we
non obstrusive and accessible portfolio supporting multiple media : photos, video (flv), audio (mp3). Demo in your BODY section, just add a simple html list of medias : <ul class="multimedia-portfolio
Sun Microsystems 宣布发布基于GlassFish的开源网络平台Sun GlassFish Portfolio。GlassFish Portfolio可以将Aache Tomcat, Ruby, PHP, Liferay Portal 和 GlassFish等组件封装到一个开源的平台。以GlassFish Enterprise Server为基础,它将适用于大规模关键任务环境以及部门
Start Bootstrap - Stylish Portfolio Stylish Portfolio is a responsive, one page portfolio theme for Bootstrap created by Start Bootstrap. The theme features multiple content sections with an off canva
凭借 Adobe Portfolio,您可以快速、轻松地构建个性化网站,以彰显您的富有创意的作品。可以随着任何 Creative Cloud 订阅产品免费提供。 什么是 Adobe Portfolio? 美观、简洁的创意作品展示网站。如果创意工作是您一生的工作,那么没有什么比拥有美观的作品展示网站更为重要。通过随 Adobe Creative Cloud 计划免费提供的 Portfolio,您可以