Skip to content

Commit

Permalink
feat: add cover images to posts
Browse files Browse the repository at this point in the history
  • Loading branch information
cseas committed Jan 22, 2025
1 parent 0afe6c5 commit 3bd73d9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/posts/contribute-mozilla.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "How to contribute to Mozilla"
date: "2021-02-20"
date: "2024-12-25"
cover: "/covers/mozilla-hero.avif"
---

As a [Mozilla Rep][1], I get this question often, specially from students.
Expand Down
17 changes: 17 additions & 0 deletions docs/posts/kubectl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
```sh
getpods() {
OUTPUT+="$(kubectl get pods -n dashboard | grep ${1:-abhijeet})\n";
OUTPUT+="$(kubectl get pods -n frontend-graphql | grep ${1:-abhijeet})\n";
OUTPUT+="$(kubectl get pods -n sme-dashboard | grep ${1:-abhijeet})\n";
OUTPUT+="$(kubectl get pods -n api | grep ${1:-abhijeet})\n";
OUTPUT+="$(kubectl get pods -n ufh | grep ${1:-abhijeet})\n";
OUTPUT+="$(kubectl get pods -n pgos | grep ${1:-abhijeet})\n";
OUTPUT+="$(kubectl get pods -n onboarding | grep ${1:-abhijeet})\n";
OUTPUT+="$(kubectl get pods -n asv | grep ${1:-abhijeet})\n";
echo ${OUTPUT} | column -t;
}

watchpods() {
watch "zsh -c 'source ~/.zshrc; getpods ${1:-abhijeet}'"
}
```
Binary file added public/covers/mozilla-hero.avif
Binary file not shown.
2 changes: 2 additions & 0 deletions src/Posts/components/PostListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export function PostListItem({ postData }: PostListItemProps) {
{frontMatter.title}
</Typography>

<img src={frontMatter.cover} alt="cover" />

{/* TODO: This is a use-case where we need the Typography styles
but we can't use the Typography component because it needs to render
as a <time> element which has different props. Ideally the classNames
Expand Down

0 comments on commit 3bd73d9

Please sign in to comment.