diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e195f41..a6768e9 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -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]
diff --git a/Gemfile b/Gemfile
index 05f6909..c392852 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,21 +1,21 @@
-source "https://rubygems.org"
-ruby RUBY_VERSION
-
-gem "jekyll"
-
-# If you have any plugins, put them here!
-group :jekyll_plugins do
- gem "jemoji"
- gem "github-pages"
- gem "jekyll-remote-theme"
- gem "jekyll-feed"
-end
-
-# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
-gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
-
-gem 'webrick', '~> 1.7'
-
-# gem "rake"
-# gem 'prism', '~> 0.17.1'
-# gem 'ruby-lsp', '~> 0.12.4'
+source "https://rubygems.org"
+ruby RUBY_VERSION
+
+gem "jekyll"
+
+# If you have any plugins, put them here!
+group :jekyll_plugins do
+ gem "jemoji"
+ gem "github-pages"
+ gem "jekyll-remote-theme"
+ gem "jekyll-feed"
+end
+
+# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
+gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
+
+gem 'webrick', '~> 1.9'
+
+# gem "rake"
+# gem 'prism', '~> 0.17.1'
+# gem 'ruby-lsp', '~> 0.12.4'
diff --git a/Gemfile.lock b/Gemfile.lock
index 089e757..2b2a23e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,8 +1,9 @@
GEM
remote: https://rubygems.org/
specs:
- activesupport (7.2.1.1)
+ activesupport (8.0.0)
base64
+ benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
@@ -12,9 +13,11 @@ GEM
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
+ uri (>= 0.13.1)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
base64 (0.2.0)
+ benchmark (0.4.0)
bigdecimal (3.1.8)
coffee-script (2.4.1)
coffee-script-source
@@ -34,13 +37,13 @@ GEM
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
- execjs (2.9.1)
- faraday (2.12.0)
- faraday-net_http (>= 2.0, < 3.4)
+ execjs (2.10.0)
+ faraday (2.12.1)
+ faraday-net_http (>= 2.0, < 3.5)
json
logger
- faraday-net_http (3.3.0)
- net-http
+ faraday-net_http (3.4.0)
+ net-http (>= 0.5.0)
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-aarch64-linux-musl)
ffi (1.17.0-arm-linux-gnu)
@@ -221,7 +224,7 @@ GEM
gemoji (>= 3, < 5)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
- json (2.7.2)
+ json (2.8.2)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
@@ -237,7 +240,7 @@ GEM
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.25.1)
- net-http (0.4.1)
+ net-http (0.5.0)
uri
nokogiri (1.16.7-aarch64-linux)
racc (~> 1.4)
@@ -261,7 +264,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
- rexml (3.3.8)
+ rexml (3.3.9)
rouge (3.30.0)
rubyzip (2.3.2)
safe_yaml (1.0.5)
@@ -273,7 +276,7 @@ GEM
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
- securerandom (0.3.1)
+ securerandom (0.3.2)
simpleidn (0.2.3)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
@@ -282,8 +285,8 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (1.8.0)
- uri (0.13.1)
- webrick (1.8.2)
+ uri (1.0.2)
+ webrick (1.9.0)
PLATFORMS
aarch64-linux
@@ -308,7 +311,7 @@ DEPENDENCIES
jekyll-remote-theme
jemoji
tzinfo-data
- webrick (~> 1.7)
+ webrick (~> 1.9)
RUBY VERSION
ruby 3.3.5p100
diff --git a/MAINTAINERS.md b/MAINTAINERS.md
index 5c09acd..01f9946 100644
--- a/MAINTAINERS.md
+++ b/MAINTAINERS.md
@@ -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
@@ -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!
diff --git a/_data/conferences.json b/_data/conferences.json
index b86f942..b47d577 100644
--- a/_data/conferences.json
+++ b/_data/conferences.json
@@ -1,22 +1,12 @@
[
{
- "conference_name": "PyconUg",
- "url": "https://ug.pycon.org",
- "conference_start_date": "2024-10-09",
- "conference_end_date": "2024-10-13",
+ "conference_name": "DELSU Tech Invasion 2.0",
+ "url": "https://dti.hamplustech.com/",
+ "conference_start_date": "2024-12-04",
+ "conference_end_date": "2024-12-05",
"conference_type": "in-person",
- "conference_location": "NWSC International Resource Centre (IREC), Kampala, Uganda",
- "summary": "The conference is a five-day event, 9-13 October. PyconUganda inherit this tradition of an annual event that brings together python enthusiasts, tech audiences and technology business in uganda and around the world.",
- "speaking": null
- },
- {
- "conference_name": "PyHo",
- "url": "https://twitter.com/pythonho",
- "conference_start_date": "2024-10-25",
- "conference_end_date": "2024-10-26",
- "conference_type": "in-person",
- "conference_location": "University of Health and Allied Sciences, Trafalgar, Ho. Ho, Volta Region, Ghana.",
- "summary": "PyHo, champion the leverage of Python in education promote diversity and inclusion from underrepresented communities within\nthe/beyond our region. Provide the foundational platform for new and experienced speakers alike to share ideas and resources.",
- "speaking": null
+ "conference_location": "Abraka, Delta State, Nigeria",
+ "summary": "This is the second edition of DELSU Tech Invasion (DTI) with the theme: Learn . Innovate . Earn. The subject or focus area is Python for Academics: Spreadsheet and Data Manipulation, Data Analytics and Visualization.",
+ "speaking": "- Developing lite web apps using Flask and Python - [Michael Oghenerukevwe Edward](http://linkedin.com/in/airdward/)\n- Transitioning in Tech Ecosystem as a Female - [Precious Ogbuka](https://www.linkedin.com/in/precious-ogbuka)\n- Rapid Development of Desktop Apps using Tkinter and Python - [Azubuike Uche Nathan](https://x.com/NathanAzub10827)\n- Why Learn, Innovate and Earn - [Naomi Apomejevwe Egbe](https://x.com/IamNaomiEgbe)\n- Gender diversity and inclusion in the tech ecosystem - [Elozino Onorie](https://x.com/_hush_7)\n- others can be found in the links below:\n - https://dti.hamplustech.com/pages/speaker/\n - https://dti.hamplustech.com/pages/schedule/"
}
]
diff --git a/_includes/conferences.html b/_includes/conferences.html
index d9e9393..54818ff 100644
--- a/_includes/conferences.html
+++ b/_includes/conferences.html
@@ -18,9 +18,7 @@
{% endif %}
{% if conference.speaking %}
Speaking:
-
{{ conference.speaking | markdownify }}
-
{% endif %}
{% endfor %}
diff --git a/_includes/latest-posts.html b/_includes/latest-posts.html
index 4a52c65..40fbf0e 100644
--- a/_includes/latest-posts.html
+++ b/_includes/latest-posts.html
@@ -2,15 +2,20 @@
{{ page.list_title }}
{%- endif -%}
- {%- assign date_format = site.bpdevs.date_format | default: "%b %-d, %Y" -%} {% assign count = 0 %} {% assign limit_posts = 3 %} {%- for post in posts -%} {%- if count < limit_posts -%}
-
-
-
{{ post.date | date: date_format }}
- {%- if site.show_excerpts -%} {{ post.excerpt }} {%- endif -%}
+ {%- assign date_format = site.bpdevs.date_format | default: "%b %-d, %Y" -%}
+
+ {% assign count = 0 %} {% assign limit_posts = 3 %} {%- for post in posts -%} {%- if count < limit_posts -%}
+
+
+
{{ post.date | date: date_format }}
+ {%- if site.show_excerpts -%}
+
{{ post.description }}
+ {%- endif -%}
+
+ {%- assign count = count | plus: 1 -%} {%- endif -%} {%- endfor -%}
- {%- assign count = count | plus:1 -%} {%- endif -%} {%- endfor -%}
{% if site.paginate %}
diff --git a/_includes/posts.html b/_includes/posts.html
index 4907b5b..583964f 100644
--- a/_includes/posts.html
+++ b/_includes/posts.html
@@ -20,8 +20,10 @@
{{ post.date | date: date_format }}
{%- if site.show_excerpts -%}
- {{ post.excerpt }}
- {%- endif -%}
+
+ {{ post.description }}
+
+ {%- endif -%}
{%- assign count = count | plus:1 -%}
{%- endfor -%}
diff --git a/_layouts/default.html b/_layouts/default.html
index 044d03b..9e3363f 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -3,7 +3,7 @@
-
+
{% if page.title %}{{ site.title }} | {{ page.title }}{% else %}{{ site.title }}{% endif %}
@@ -12,7 +12,6 @@
-
{% if page.lang and page.untranslated != true and site.data.locales.size > 1 %}
{% assign locales = site.data.locales | sort %}
{% for locale in locales %}
@@ -37,6 +36,5 @@
{%- include footer.html -%}
-