Skip to content

Commit

Permalink
Merge pull request #563 from BlackPythonDevs/556-auto-generate-post-d…
Browse files Browse the repository at this point in the history
…escriptions

556 auto generate post descriptions
  • Loading branch information
TimOsahenru authored Nov 6, 2024
2 parents 98aeeae + 667497a commit 0e0013f
Show file tree
Hide file tree
Showing 31 changed files with 313 additions and 71 deletions.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@ repos:
rev: 23.9.1
hooks:
- id: black
- repo: local
hooks:
- id: check-for-layout
name: check-for-layout
files: _posts/.*.md
entry: python update_layout.py
language: python
additional_dependencies: [typer, python-frontmatter, typing-extensions]
29 changes: 29 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ First off, thank you for considering contributing to Black Python Devs website.
- [Translations](#translations)
- [Styling](#styling)
- [Adding New Pages](#adding-new-pages)
- Post Validation

# Before You Get Started

Expand Down Expand Up @@ -203,6 +204,34 @@ ROUTES = [

- Make sure your new page renders correctly and all links work as expected.

## Layout Validation

### Automatic Layout Updates

To ensure consistency across all blog posts, we've implemented automatic layout validation and updating functionality. This helps maintain proper frontmatter configuration for all Markdown files in the `_posts` directory.

### Tools and Features

#### `update_layout.py` CLI Tool

- Checks and applies missing layout fields to post files
- Can process multiple posts simultaneously
- Usage:
```bash
python update_layout.py fix|check path/to/post1.md [path/to/post2.md ...]
```

#### Pre-commit Hook

We've implemented a custom pre-commit hook that automatically runs the `update_layout.py` update check on any `.md` files in the `_posts` directory that are being committed. The hook will:

- Run automatically before each commit
- Check all modified `.md` files in the `_posts` directory
- Apply the necessary layout field if missing
- Fail the commit initially but fix the issue, allowing you to commit again

For manual layout checks and updates, you can always run the `update_layout.py` tool directly.

---

Remember, when in doubt, don't hesitate to ask for help in our Discord community or in a GitHub issue!
6 changes: 4 additions & 2 deletions _includes/latest-posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ <h2 class="post-list-heading">{{ page.list_title }}</h2>
<h3>
<a class="" href="{{ post.url | relative_url }}"> {{ post.title | escape }} </a>
</h3>
<span class="post-meta">{{ post.date | date: date_format }}</span>
{%- if site.show_excerpts -%} {{ post.excerpt }} {%- endif -%}
<p>{{ post.date | date: date_format }}</p>
{%- if site.show_excerpts -%}
<p class="post-description" style="margin-bottom: 2rem">{{ post.description}}</p>
{%- endif -%}
</div>
{%- assign count = count | plus:1 -%} {%- endif -%} {%- endfor -%}
</article>
Expand Down
6 changes: 4 additions & 2 deletions _includes/posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ <h3>
</h3>
<span class="post-meta">{{ post.date | date: date_format }}</span>
{%- if site.show_excerpts -%}
{{ post.excerpt }}
{%- endif -%}
<p class="post-description">
{{ post.description }}
</p>
{%- endif -%}
</div>
{%- assign count = count | plus:1 -%}
{%- endfor -%}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}" />
<meta name="description" content="{% if page.description%}{{ page.description | escape }}{% else %}{{ site.description }}{% endif %}" />
<title>{% if page.title %}{{ site.title }} | {{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}" />
<link rel="stylesheet" href="{{ '/assets/css/pico.min.css' | relative_url }}" />
Expand Down
8 changes: 5 additions & 3 deletions _posts/2023-10-20-djangoconus.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
layout: post
lang: en
title: "DjangoCon US 2023"
date: 2023-10-20
description: Join us for a behind-the-scenes look at DjangoCon US 2023, where diversity
and inclusion came together to shape a powerful community of Python developers.
lang: en
layout: post
title: DjangoCon US 2023
---

In Durham, North Carolina, approximately 300 Django developers gathered from all over the world for [DjangoCon US](https://2023.djangocon.us/). This event showcased the knowledge of the community and celebrated its cultural diversity and the diversity of its hosting city. The event was located at the Marriot Convention Center, in the heart of the city. There were many resturants and smaller attractions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: "What is the US Conference City Diversity Metric"
layout: post
lang: en
date: 2023-11-11
author: Jay Miller
date: 2023-11-11
description: Discover how the US Conference Diversity Metric can inform your event's
location and create a more inclusive experience for attendees, with expert analysis
from Jay Miller.
lang: en
layout: post
title: What is the US Conference City Diversity Metric
---

In 2022 at DjangoCon I took a look at the location of all of the PyCon US locations and their makeup by race. I highlighted that in the first 10 years of PyCon's existence, 9 of those 10 events were in culturally diverse cities like Atlanta, Washington DC and Chicago. The second half was during Python's boom and the need for larger venues started pushing conferences to more affordable areas with large international airports. These were places like Salt Lake City, Portland, and Montreal.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
title: "Black Python Devs Represent in DSF Elections"
date: 2023-11-13
author: Jay Miller
date: 2023-11-13
description: Find out how the growing presence of Black Python Developers is shaping
the future of diversity in the tech industry through the DSF Elections.
lang: en
layout: post
title: Black Python Devs Represent in DSF Elections
---

The DSF Board Elections have opened and voting is available for DSF members now until 27 November 2023 (Anywhere on Earth).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: "Dawn Wages, Sarah Abderemane and Djangonaut Space Awarded the Malcolm Tredinnick Memorial Prize"
date: 2023-12-14
author: Jay Miller
date: 2023-12-14
description: Discover how the innovative team at Djangonaut Space is making a lasting
impact on the Django community with sustainable initiatives and groundbreaking projects.
lang: en
layout: post
title: Dawn Wages, Sarah Abderemane and Djangonaut Space Awarded the Malcolm Tredinnick
Memorial Prize
---

Each year the _Django Software Foundation_, selects a person or group that exemplifies the outstanding service to community as shown by the award's namesake.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: "Sarah Abderemane Selected to the Django Software Foundation Board of Directors"
date: 2023-12-14
author: Jay Miller
date: 2023-12-14
description: Discover how Sarah Abderemane's selection to the Django Software Foundation
Board of Directors is a significant milestone for the thriving Black Python Devs
community.
lang: en
layout: post
title: Sarah Abderemane Selected to the Django Software Foundation Board of Directors
---

This year Black Python Devs were strongly represented with [41% of the folks running](https://blackpythondevs.github.io/2023-11-13-black-python-devs-represent-in-dsf-elections/) belonging to the community.
Expand Down
7 changes: 5 additions & 2 deletions _posts/2024-01-12-black-python-devs-is-sponsoring-pytexas.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: "Black Python Devs is Sponsoring PyTexas"
date: 2024-01-12
author: Jay Miller
date: 2024-01-12
description: Discover how Black Python Devs is supporting PyTexas, a premier regional
Python conference in Austin, TX, and learn about opportunities to attend for free
through ticket giveaways and speaker selection.
lang: en
layout: post
title: Black Python Devs is Sponsoring PyTexas
---

We've got some fantastic updates to share about our upcoming involvement with PyTexas! We're thrilled to announce that we are a community sponsor for PyTexas!
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
layout: post
lang: en
title: "Marlene Mhangami Recognized as Python Fellow for Q3 2023"
date: 2024-01-25
description: Meet Marlene Mhangami, a trailblazing leader in the Python community
recognized for her exceptional contributions as PSF Chair and DEI Working Group
member, now highlighted as a Q3 2023 Python Fellow.
lang: en
layout: post
title: Marlene Mhangami Recognized as Python Fellow for Q3 2023
---

Every quarter, the Python Software Foundation recognizes individuals in the community for their exceptional contributions to the Python community. Black Python Devs member [Marlene Mangami](http://marlenemhangami.com/) was selected as a fellow for [Q3 2023](https://pyfound.blogspot.com/2024/01/announcing-python-software-foundation.html).
Expand Down
8 changes: 5 additions & 3 deletions _posts/2024-03-13-pycon-us-announcement.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
layout: post
lang: en
title: "Black Python Devs x PyCon US"
date: 2024-03-13
description: Explore how Black Python Devs is shaping the future of the Python community
through a range of events and activities at PyCon US.
lang: en
layout: post
title: Black Python Devs x PyCon US
---

PyCon US is coming and Black Python Devs will represented strongly.
Expand Down
9 changes: 6 additions & 3 deletions _posts/2024-05-03-pycon_ng_2024.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
layout: post
title: Black Python Devs is sponsoring PyCon Nigeria 2024
date: 2024-05-03
lang: en
description: Discover how Black Python Devs is empowering the next generation of developers
through its partnership with PyCon Nigeria 2024 and learn about exclusive opportunities
for students.
featured_image: /assets/images/bpdxpyconng.jpg
lang: en
layout: post
title: Black Python Devs is sponsoring PyCon Nigeria 2024
---

We're happy to annouce that Black Python Devs will be sponsoring [PyCon Nigeria 2024](https://ng.pycon.org/) as a part of our _Build Local Community Initiative_. This commitment comes with the added benefit of free student ticket for qualifying Black Python Devs members.
Expand Down
8 changes: 5 additions & 3 deletions _posts/2024-05-17-non-profit-announcement.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
layout: post
lang: en
title: Black Python Devs is now a Non-Profit Under the GNOME Foundation
date: 2024-05-16
description: Discover how a historic partnership between two influential organizations
is revolutionizing tech diversity and innovation in the open-source world.
featured_image: /assets/images/BPD_STACKED_featured.png
lang: en
layout: post
title: Black Python Devs is now a Non-Profit Under the GNOME Foundation
---

The [GNOME Foundation](https://foundation.gnome.org/) and Black Python Devs are proud to announce that our organizations have entered into a fiscal sponsorship agreement for the mutual benefit of our communities and the greater OS world.
Expand Down
9 changes: 6 additions & 3 deletions _posts/2024-05-22-why-we-use-colored-and-coloured.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
layout: post
lang: en
title: Why We Use Black, Colored and Coloured when Describing Members
date: 2024-05-22
description: Join us as we explore a nuanced approach to inclusive language, examining
the complexities of terms like "Black", "Colored", and "coloured" in describing
our community members.
featured_image: /assets/images/BPD_PyCon_2024_cropped.jpg
lang: en
layout: post
title: Why We Use Black, Colored and Coloured when Describing Members
---

We've received concerns from (up to this point) entirely white folks on the internet about our usage of words like _Colored_ and _Coloured_ when regarding some of our members.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
---
layout: "post"
lang: "en"
author: "Anotida Expected Msiiwa"
title: "Abigail Mesrenyame Dogbe Honored with Inaugural Outstanding PyLady Award"
author: Anotida Expected Msiiwa
date: 2024-01-25
featured_image: "/assets/images/opa_winners_2024.png"
description: Meet Abigail Mesrenyame Dogbe, a dedicated member of Black Python Devs
and recipient of the Inaugural Outstanding PyLady award, whose inspiring contributions
to the open-source community are empowering women in STEM.
featured_image: /assets/images/opa_winners_2024.png
lang: en
layout: post
title: Abigail Mesrenyame Dogbe Honored with Inaugural Outstanding PyLady Award
---

Every year, the PyLadies community recognizes individuals for their remarkable contributions to the open-source community with the [Inaugural Outstanding PyLady award](https://kit.pyladies.com/en/latest/global/award.html). This year, we are thrilled to announce that [Abigail Mesrenyame Dogbe](https://mesrenyamedogbe.hashnode.dev), a dedicated member of Black Python Devs, has been honored with this prestigious award at PyCon 2024 in Pittsburgh, PA.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: "Black Python Developers Running for the 2024 Python Software Foundation Board"
date: 2024-07-03
author: Anotida Expected Msiiwa
date: 2024-07-03
description: Join us in learning about four exceptional Black Python developers who
are shaping the future of the Python community and running for a crucial role on
the Python Software Foundation Board.
lang: en
layout: post
title: Black Python Developers Running for the 2024 Python Software Foundation Board
---

We are thrilled to announce that four exceptional Black Python developers are running for the [Python Software Foundation (PSF)](https://www.python.org/psf-landing/) Board of Directors this year. The candidates are Monica Oyugi, Abigail Dogbe, Darrell Jenkins, and Jeremy Tanner. Their dedication and contributions to the Python community are truly inspiring.
Expand Down
13 changes: 8 additions & 5 deletions _posts/2024-07-20-black-python-devs-partners-with-pyohio.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
---
title: "Black Python Devs Partners with PyOhio to Foster Community Growth"
author: Anotida Expected Msiiwa
date: 2024-07-20
author: "Anotida Expected Msiiwa"
lang: "en"
layout: "post"
featured_image: "/assets/images/black-python-devs-x-pyohio.png"
description: Discover how Black Python Devs is teaming up with PyOhio to create a
more inclusive and diverse community, supporting and amplifying the voices of Black
developers in Ohio and beyond.
featured_image: /assets/images/black-python-devs-x-pyohio.png
lang: en
layout: post
title: Black Python Devs Partners with PyOhio to Foster Community Growth
---

We are thrilled to announce a significant new partnership between Black Python Devs and [PyOhio](https://www.pyohio.org/2024/)! This collaboration marks a major milestone in our mission to amplify the involvement of Black developers within the Python community, with a particular focus on the Ohio region. Our financial support for PyOhio is designed to stimulate community engagement and foster growth in the years to come.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
title: Black Python Devs Partners with Python Morsels for High Five Launch
author: Jay Miller
date: 2024-08-15
description: Discover how to kickstart your Python skills with a comprehensive 10-week
course, featuring daily exercises, community support, and real-world applications
- now available with an exclusive $30 off offer.
lang: en
author: Jay Miller
layout: post
title: Black Python Devs Partners with Python Morsels for High Five Launch
---

We’re thrilled to announce a that Python Morsels is offering us an affiliate partnership for [Python High Five](https://www.pythonmorsels.com/high-five/), a comprehensive 10-week Python course starting in early September.
Expand Down
8 changes: 6 additions & 2 deletions _posts/2024-08-16-talkpython-training-partnership.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
title: "Talk Python Training Partners with Black Python Devs"
date: 2024-08-16
author: Jay Miller
date: 2024-08-16
description: Learn how TalkPython Training's new partnership with Black Python Devs
is driving greater diversity and benefiting learners through a unique opportunity
to support both your education and the community.
lang: en
layout: post
title: Talk Python Training Partners with Black Python Devs
---

We are excited to announce a new partnership with TalkPython Training!
Expand Down
10 changes: 7 additions & 3 deletions _posts/2024-09-09-oreilly-partnership.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
title: "O'Reilly Media Partners with Black Python Devs"
date: 2024-09-09
author: Jay Miller
lang: en
date: 2024-09-09
description: Get the inside scoop on O'Reilly Media's innovative partnership with
Black Python Devs and discover how it's revolutionizing access to high-quality learning
resources for the Black Python community.
featured_image: /assets/images/bpd_x_oreilly.jpg
lang: en
layout: post
title: O'Reilly Media Partners with Black Python Devs
---

We are excited to announce a new partnership with O'Reilly Media!
Expand Down
9 changes: 6 additions & 3 deletions _posts/2024-10-13-black-python-devs-ghana-event.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: "Black Python Devs Ghana Connect Meetup"
date: 2024-10-13
author: Abigail Afi Gbadago
lang: en
date: 2024-10-13
description: Discover how Ghanaian developers turned their passion for coding into
a career with inspiring stories of perseverance and innovation in Python.
featured_image: /assets/images/bpd_ghana_connect1.webp
lang: en
layout: post
title: Black Python Devs Ghana Connect Meetup
---

On Saturday, August 17th, 2024, Stancy and Afi hosted the Black Python Devs Ghana Connect Meetup at Accra Mall, Pizza Inn. The event started at 1 PM with a warm introduction and welcome remarks from our moderator, Theresa Seyram Agbenyegah. We had an enthusiastic turnout of 22 participants, each of whom introduced themselves during an icebreaker session.
Expand Down
10 changes: 7 additions & 3 deletions _posts/2024-10-19-black-python-devs-leadership-summit.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
title: "Black Python Devs Leadership Summit"
date: 2024-10-19
author: Abigail Afi Gbadago
lang: en
date: 2024-10-19
description: Join Abigail Afi Gbadago and other leaders at the highly successful Black
Python Devs Leadership Summit as they shared insights on succession planning, mental
health, and leadership skills in a day of engaging talks and interactive sessions.
featured_image: /assets/images/bpd-leadership-summit-1.jpeg
lang: en
layout: post
title: Black Python Devs Leadership Summit
---

The Black Python Devs Leadership Summit, which took place on September 21st at 8 a.m. was a successful event.
Expand Down
Loading

0 comments on commit 0e0013f

Please sign in to comment.