ÚLTIMAS ENTRADAS
-ÚLTIMAS ENTRADAS
+Nuestros Patrocinantes
¿Te gustaría patrocinar las actividades de la comunidad Python Chile?
Contáctanos y te contamos como: contacto@pythonchile.cl
diff --git a/authors/pablo-lira.md b/authors/pablo-lira.md new file mode 100644 index 0000000..7084227 --- /dev/null +++ b/authors/pablo-lira.md @@ -0,0 +1,10 @@ +--- +nombre: pablo lira +github: pablolirag +linkedin: pablolirag +image: coordinacion_pablo_lira.jpg +x: pablolirag +website: https://pablolira.cl +--- + +Pablo Lira es ingeniero de software y analista superior, con experiencia en el desarrollo de aplicaciones orientadas a crear soluciones eficientes y funcionales. Apasionado por la electrónica, combina el mundo del software y el hardware para diseñar proyectos innovadores, siempre enfocado en el aprendizaje continuo y la mejora tecnológica. \ No newline at end of file diff --git a/pelicanconf.py b/pelicanconf.py index e9f4272..2dbc4db 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -129,6 +129,43 @@ } DEFAULT_PAGINATION = 6 +PAGINATED_DIRECT_TEMPLATES = ["index", "archives"] + +# Implement author metadata loading +from pelican import signals + +def load_author_metadata(generator): + for author, articles in generator.authors: + author_slug = author.slug + author_file = os.path.join("authors", f"{author_slug}.md") + + if os.path.exists(author_file): + with open(author_file, "r", encoding="utf-8") as f: + content = f.read() + + # Manual frontmatter parsing to avoid PyYAML dependency + if content.startswith("---"): + parts = content.split("---", 2) + if len(parts) >= 3: + frontmatter = parts[1] + author.bio = parts[2].strip() + + # Parse key-value pairs + metadata = {} + for line in frontmatter.splitlines(): + if ":" in line: + key, value = line.split(":", 1) + metadata[key.strip()] = value.strip() + + author.image = metadata.get("image") + author.github = metadata.get("github") + author.linkedin = metadata.get("linkedin") + author.twitter = metadata.get("x") or metadata.get("twitter") + author.website = metadata.get("website") + author.name = metadata.get("nombre") or author.name + +# Connect signal directly +signals.article_generator_finalized.connect(load_author_metadata) # Uncomment following line if you want document-relative URLs when developing # RELATIVE_URLS = True diff --git a/pycltheme/templates/archives.html b/pycltheme/templates/archives.html index 56c3016..80eec04 100644 --- a/pycltheme/templates/archives.html +++ b/pycltheme/templates/archives.html @@ -5,10 +5,13 @@ {% block content %}
{{ author.bio }}
+ {% endif %} + +¿Te gustaría patrocinar las actividades de la comunidad Python Chile?
Contáctanos y te contamos como: contacto@pythonchile.cl