Add JSONResume theme targets & OG/Twitter meta tag support
- Makefile: Add jsonresume-all-html target to export resume in 30 themes - Makefile: Curate list of 30 tested working JSONResume themes - pelicanconf.py: Add extract_first_image filter for social media unfurling - Resume: Add Queues skill category (SQS, RabbitMQ, ZMQ)
This commit is contained in:
parent
93ce9a9cab
commit
b5232587c2
4 changed files with 43 additions and 13 deletions
|
|
@ -109,7 +109,14 @@ PLUGIN_PATHS = ["pelican-plugins", "lib"]
|
|||
PLUGINS = ["random_article", "strip_toc_summary"]
|
||||
|
||||
# register filters.
|
||||
# JINJA_FILTERS = {'linkpeek':linkpeek}
|
||||
import re
|
||||
|
||||
def extract_first_image(content):
|
||||
"""Extract first image URL from HTML content."""
|
||||
match = re.search(r'(?:src|href)=["\']([^"\']+\.(?:jpg|jpeg|png|gif|webp))["\']', content, re.IGNORECASE)
|
||||
return match.group(1) if match else None
|
||||
|
||||
JINJA_FILTERS = {'extract_first_image': extract_first_image}
|
||||
|
||||
# register linkpeek docutils directive.
|
||||
import sys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue