Skip to content

Commit e81045d

Browse files
srericksonjosenino95
authored andcommitted
update index layout with latest changes from main
1 parent db56303 commit e81045d

7 files changed

Lines changed: 76 additions & 4 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: "Welcome to the UCSB Carpentry Blog"
3+
date: 2026-01-15
4+
author: "UCSB Carpentry Team"
5+
summary: "Introducing our new posts section for long-form content, tutorials, and community updates."
6+
---
7+
8+
Welcome to the new posts section of the UCSB Library Carpentry website!
9+
10+
This space is dedicated to long-form content including:
11+
12+
- **Tutorials and guides** - Deep dives into programming concepts and tools
13+
- **Community updates** - News about our workshops, instructors, and events
14+
- **Research highlights** - Stories about how computational skills are being used in research at UCSB
15+
- **Tips and tricks** - Helpful advice for learners at all levels
16+
17+
Stay tuned for more content, and don't forget to check out our upcoming [workshops](/) and [community meetings](/).
18+
19+
If you're interested in contributing a post, please reach out to the Carpentry team!

content/posts/_index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "Posts"
3+
---
4+
5+
Long-form articles and updates from the UCSB Library Carpentry community.

hugo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ disableKinds = ['RSS', 'sitemap', 'taxonomy', 'term']
1313
[permalinks.page]
1414
workshop = '/workshop/:year/:month/:day/:slug'
1515
meeting = '/meeting/:year/:month/:day/:slug'
16+
posts = '/posts/:year/:month/:slug'
1617

1718
# Allow raw HTML in markdown (needed for inline HTML in content)
1819
[markup]

layouts/_default/baseof.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ <h1> Carpentry @ UCSB Library</h1>
1616
<nav>
1717
<ul>
1818
<li><a href="/">Home</a></li>
19+
<li><a href="/posts/">Posts</a></li>
1920
<li><a href="/community/instructors">Carpentry Community</a></li>
2021
<li><a href="https://www.library.ucsb.edu/events-exhibitions?location=All&series=1225" target="_blank">Events Calendar</a></li>
2122
<li><a href="/past-workshops/">Past Workshops</a></li>

layouts/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
<h2>Workshops</h2>
44

5-
{{/* show workshops after cutoff date - equivalent to Jekyll's assign cutoff = '2025-11-07' */}}
6-
{{ $cutoff := time "2025-11-07" }}
5+
{{/* show workshops after cutoff date - equivalent to Jekyll's assign cutoff = '2026-02-15' */}}
6+
{{ $cutoff := time "2026-02-15" }}
77
{{ $workshops := where .Site.RegularPages "Section" "workshop" }}
88
{{ $sortedWorkshops := sort $workshops "Date" }}
99
{{ $lastWorkshop := index (last 1 $sortedWorkshops) 0 }}
@@ -23,9 +23,8 @@ <h2>Workshops</h2>
2323

2424
<h2>Related events</h2>
2525
<ul>
26+
<li>March 6: <a href="https://www.library.ucsb.edu/events-exhibitions/workshop-1-how-make-map-arcgis-online" target="_blank">How to make a map with ArcGIS Online</a></li>
2627
<li>Thursdays this Winter: <a href="https://bit.ly/D2D_2026Winter" target="_blank">Data to Discovery Series (30-minute sessions on data visualization and visual communication)</a></li>
27-
<li>February 9 - 13: <a href="https://uc-love-data-week.github.io/" target="_blank">UC Love Data Week</a></li>
28-
<li>February 9: <a href="https://www.library.ucsb.edu/events-exhibitions/events/ai-in-action" target="_blank">AI in Action: Conversations with UCSB Researchers</a></li>
2928
</ul>
3029

3130
<h2>Community Meetings</h2>

layouts/posts/list.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{{ define "main" }}
2+
<h1>{{ .Title }}</h1>
3+
4+
{{ .Content }}
5+
6+
<div class="posts-list">
7+
{{ $posts := .Pages }}
8+
{{ $sortedPosts := sort $posts "Date" "desc" }}
9+
{{ range $sortedPosts }}
10+
<article class="post-summary">
11+
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
12+
<p class="post-meta">{{ .Date.Format "January 2, 2006" }}</p>
13+
{{ with .Params.summary }}
14+
<p class="post-excerpt">{{ . }}</p>
15+
{{ else }}
16+
<p class="post-excerpt">{{ .Summary }}</p>
17+
{{ end }}
18+
</article>
19+
{{ end }}
20+
</div>
21+
22+
{{ if eq (len $sortedPosts) 0 }}
23+
<p>No posts yet. Check back soon!</p>
24+
{{ end }}
25+
{{ end }}

layouts/posts/single.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{ define "main" }}
2+
<article class="post">
3+
<header class="post-header">
4+
<h1>{{ .Title }}</h1>
5+
<p class="post-meta">
6+
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2, 2006" }}</time>
7+
{{ with .Params.author }}
8+
<span class="post-author"> &bull; {{ . }}</span>
9+
{{ end }}
10+
</p>
11+
</header>
12+
13+
<div class="post-content">
14+
{{ .Content }}
15+
</div>
16+
17+
<footer class="post-footer">
18+
<hr style="border: none; border-top: 1px solid #ddd; margin: 40px 0 20px 0;">
19+
<p><a href="/posts/">&larr; Back to all posts</a></p>
20+
</footer>
21+
</article>
22+
{{ end }}

0 commit comments

Comments
 (0)