Skip to content

Commit

Permalink
feat: add descriptions to portfolio categories (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzobalzani committed Apr 6, 2024
1 parent 2cf7bb4 commit a0beb99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions exampleSite/data/portfolio.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
portfolioitems:
# portfolio category
- title: Coding Projects
description: 'All my coding projects'
portfolioitem:
- name: Project 1
image: '/images/portfolio/code.jpg'
Expand Down Expand Up @@ -33,6 +34,7 @@ portfolioitems:
- Tag 2
# portfolio category
- title: Research
description: 'All my research projects'
portfolioitem:
- name: Project 1
image: '/images/portfolio/code.jpg'
Expand Down
4 changes: 4 additions & 0 deletions layouts/portfolio/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
{{ end }}"
>
{{ $anchorTitle := delimit (split .title " ") "" }}

<h2 class="portfolio__title" id="{{ $anchorTitle | lower }}">{{ title .title }}</h2>
{{ if .description }}
<h4>{{ .description }}</h4>
{{ end }}
{{ range $i, $p := .portfolioitem }}
<div class="portfolio">
{{ if .image }}
Expand Down

0 comments on commit a0beb99

Please sign in to comment.