modified: content/2025-07-13-building-and-modding-multimower-with-dry-engine.rst modified: content/pages/cover-letters/2025-10-28-chime-russell-ballestrini.rst modified: content/pages/cover-letters/2025-10-28-gitlab-russell-ballestrini.rst modified: content/pages/cover-letters/2025-10-28-magicschool-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-03-canonical-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-03-datadog-curriculum-developer-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-03-lumin-digital-sre-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-03-synthropic-detection-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-03-truetax-elixir-phoenix-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-04-automattic-senior-systems-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-04-band-full-stack-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-06-river-senior-software-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-13-glass-health-founding-software-engineer-backend-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-13-schoolhouse-world-senior-software-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-15-zapier-senior-software-engineer-enterprise-zone-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-29-runpod-principal-software-engineer-storage-systems-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-30-coinbase-ai-growth-lead-staff-software-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-30-virta-health-senior-site-reliability-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2025-11-30-webflow-staff-software-engineer-applied-ai-russell-ballestrini.rst modified: content/pages/cover-letters/2025-12-13-energyhub-senior-software-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2026-01-05-hatchet-founding-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2026-01-05-radar-site-reliability-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2026-01-05-redpanda-software-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2026-01-05-temporal-technologies-senior-software-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2026-01-05-trunk-tech-lead-russell-ballestrini.rst modified: content/pages/cover-letters/2026-01-10-kobold-metals-senior-infrastructure-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2026-01-17-careforce-ai-senior-fullstack-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2026-01-17-lumos-devops-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2026-01-17-octane-staff-platform-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2026-01-17-prompt-health-senior-devops-engineer-russell-ballestrini.rst modified: content/pages/cover-letters/2026-01-25-phantom-senior-backend-engineer-money-movement-russell-ballestrini.rst modified: content/pages/cover-letters/2026-01-25-solflare-backend-developer-russell-ballestrini.rst new file: content/pages/cover-letters/2026-01-27-bluebird-kids-health-staff-software-engineer-russell-ballestrini.rst new file: content/pages/cover-letters/2026-01-27-hoodie-analytics-ai-automation-integration-engineer-russell-ballestrini.rst new file: content/pages/cover-letters/2026-01-27-hypothesisbase-python-software-engineer-russell-ballestrini.rst new file: content/pages/cover-letters/2026-01-27-illumen-group-developer-senior-russell-ballestrini.rst new file: content/pages/cover-letters/2026-01-27-known-senior-software-engineer-russell-ballestrini.rst new file: content/pages/cover-letters/2026-01-27-opendp-harvard-senior-data-privacy-software-developer-russell-ballestrini.rst new file: content/pages/cover-letters/2026-01-27-skycatchfire-senior-python-backend-developer-russell-ballestrini.rst modified: pelicanconf.py
133 lines
3.4 KiB
Python
133 lines
3.4 KiB
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*- #
|
|
from __future__ import unicode_literals
|
|
|
|
from os import environ
|
|
|
|
DEFAULTS = {
|
|
"AUTHOR": "Russell Ballestrini",
|
|
"SITENAME": "Russell Ballestrini",
|
|
"SITEURL": "http://127.0.0.1:8000",
|
|
#'THEME' : 'pelican-themes/svbhack',
|
|
"THEME": "pelican-themes/pelican-svbhack",
|
|
"GOOGLE_ANALYTICS": "",
|
|
"PLAUSIBLE_ANALYTICS": "",
|
|
"REMARKBOX": None,
|
|
"LINKPEEK_APIKEY": None,
|
|
"LINKPEEK_SECRET": None,
|
|
}
|
|
|
|
|
|
def get_environ_or_default(key):
|
|
return environ.get(key, DEFAULTS[key])
|
|
|
|
|
|
AUTHOR = get_environ_or_default("AUTHOR")
|
|
SITENAME = get_environ_or_default("SITENAME")
|
|
SITEURL = get_environ_or_default("SITEURL")
|
|
|
|
THEME = get_environ_or_default("THEME")
|
|
|
|
GOOGLE_ANALYTICS = get_environ_or_default("GOOGLE_ANALYTICS")
|
|
PLAUSIBLE_ANALYTICS = get_environ_or_default("PLAUSIBLE_ANALYTICS")
|
|
|
|
REMARKBOX = get_environ_or_default("REMARKBOX")
|
|
|
|
LINKPEEK_APIKEY = get_environ_or_default("LINKPEEK_APIKEY")
|
|
LINKPEEK_SECRET = get_environ_or_default("LINKPEEK_SECRET")
|
|
|
|
# Theme specific
|
|
USER_LOGO_URL = (
|
|
"https://russell.ballestrini.net/uploads/sly-red-fox.jpg"
|
|
)
|
|
# USER_LOGO_URL = (
|
|
# "https://russell.ballestrini.net/uploads/profile/russell-ballestrini-2020.jpg"
|
|
# )
|
|
TAGLINE = '<a href="/about" class="tagline">Grows Products & Services</a>'
|
|
|
|
PATH = "content"
|
|
|
|
STATIC_PATHS = ["uploads"]
|
|
|
|
TIMEZONE = "America/New_York"
|
|
|
|
DEFAULT_LANG = "en"
|
|
|
|
# Atom all feed.
|
|
FEED_ALL_ATOM = "feeds/all.atom.xml"
|
|
# Include all posts in feed (no limit) for blog.json generation
|
|
FEED_MAX_ITEMS = None
|
|
|
|
# Feed generation is usually not desired when developing
|
|
CATEGORY_FEED_ATOM = None
|
|
TRANSLATION_FEED_ATOM = None
|
|
AUTHOR_FEED_ATOM = None
|
|
AUTHOR_FEED_RSS = None
|
|
|
|
# Blogroll
|
|
LINKS = (
|
|
# ('Remarkbox', 'http://remarkbox.com/'),
|
|
# ('LinkPeek', 'https://linkpeek.com/'),
|
|
)
|
|
|
|
# Social widget
|
|
SOCIAL = (
|
|
("@russellbal", "https://twitter.com/russellbal"),
|
|
("github", "https://github.com/russellballestrini"),
|
|
("bitbucket", "https://bitbucket.org/russellballestrini"),
|
|
)
|
|
|
|
DEFAULT_PAGINATION = False
|
|
|
|
# Uncomment following line if you want document-relative URLs when developing
|
|
# RELATIVE_URLS = True
|
|
|
|
DISPLAY_PAGES_ON_MENU = False
|
|
SLUGIFY_SOURCE = "basename"
|
|
|
|
# teach pelican to use directory/index.html files
|
|
ARTICLE_URL = "{slug}/"
|
|
PAGE_URL = "{slug}/"
|
|
CATEGORY_URL = "category/{slug}/"
|
|
TAG_URL = "tags/{slug}/"
|
|
AUTHOR_URL = "author/{slug}/"
|
|
|
|
RANDOM = "random.html"
|
|
|
|
# Adjust save location.
|
|
ARTICLE_SAVE_AS = "{slug}/index.html"
|
|
PAGE_SAVE_AS = "{slug}/index.html"
|
|
CATEGORY_SAVE_AS = "category/{slug}/index.html"
|
|
TAG_SAVE_AS = "tags/{slug}/index.html"
|
|
AUTHOR_SAVE_AS = "author/{slug}/index.html"
|
|
|
|
# Enable raw source files in output directory alongside index.html
|
|
# This copies the raw .rst files to the output
|
|
OUTPUT_SOURCES = True
|
|
OUTPUT_SOURCES_EXTENSION = '.rst'
|
|
|
|
# Setup filters and plugins.
|
|
|
|
PLUGIN_PATHS = ["pelican-plugins", "lib"]
|
|
PLUGINS = ["random_article", "strip_toc_summary"]
|
|
|
|
# register filters.
|
|
import re
|
|
|
|
def extract_first_image(content):
|
|
"""Extract first image URL from HTML content."""
|
|
match = re.search(r'(?:src|href|data)=["\']([^"\']+\.(?:jpg|jpeg|png|gif|webp|svg))["\']', 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
|
|
|
|
sys.path.append("lib")
|
|
import rst_linkpeek
|
|
|
|
linkpeek = rst_linkpeek.LinkPeek
|
|
linkpeek.apikey = LINKPEEK_APIKEY
|
|
linkpeek.secret = LINKPEEK_SECRET
|
|
linkpeek.register()
|