Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions authors/pablo-lira.md
Original file line number Diff line number Diff line change
@@ -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.
37 changes: 37 additions & 0 deletions pelicanconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 9 additions & 6 deletions pycltheme/templates/archives.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
{% block content %}
<h1 class="pb-5">Entradas del Blog</h1>

<div class="row">
{% for article in dates%}
{% include 'card-page.html' %}
{% endfor %}
</div>
<div class="row">
{% for article in articles_page.object_list %}
{% include 'card-page.html' %}
{% endfor %}
</div>
{% if articles_page.has_other_pages() %}
{% include 'pagination.html' %}
{% endif %}

{% endblock %}
{% endblock %}
42 changes: 35 additions & 7 deletions pycltheme/templates/author.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,41 @@

{% block content %}
<h2 class="pb-5">Artículos por {{ author }}</h2>
<div class="row">
{% for article in articles_page.object_list %}
{% include 'card.html' %}
{% endfor %}
<div class="row pb-5">
{% if author.image %}
<div class="col-md-4 d-flex justify-content-center mb-3 mb-md-0">
<img src="{{ SITEURL }}/images/{{ author.image }}" alt="{{ author }}" class="img-fluid rounded-circle w-90 ">
</div>
{% endif %}
<div class="col-md-8 p-2 p-md-4 p-lg-5 ">
{% if author.bio %}
<p>{{ author.bio }}</p>
{% endif %}
<div class="social-links">
{% if author.github %}
<a href="https://github.com/{{ author.github }}" target="_blank" class="mr-3"><i
class="fab fa-github fa-2x"></i></a>
{% endif %}
{% if author.linkedin %}
<a href="https://linkedin.com/in/{{ author.linkedin }}" target="_blank" class="mr-3"><i
class="fab fa-linkedin fa-2x"></i></a>
{% endif %}
{% if author.twitter %}
<a href="https://x.com/{{ author.twitter }}" target="_blank" class="mr-3"><i class="fab fa-twitter fa-2x"></i></a>
{% endif %}
{% if author.website %}
<a href="{{ author.website }}" target="_blank" class="mr-3"><i class="fas fa-globe fa-2x"></i></a>
{% endif %}
</div>
</div>
</div>
<div class="row">
{% for article in articles_page.object_list %}
{% include 'card.html' %}
{% endfor %}
</div>

{% if articles_page.has_other_pages() %}
{% include 'pagination.html' %}
{% endif %}
{% endblock %}
{% include 'pagination.html' %}
{% endif %}
{% endblock %}
33 changes: 19 additions & 14 deletions pycltheme/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@
<section id="content">

<!-- Entradas Blog -->
<div class="pt-1 pb-1 blog-entries">
<div class="container">
{% block content_title %}
{% endblock %}
<div class="row flex-column-reverse flex-md-row">
<div class="col-4 col-12">
<h3 class="text-center pb-5 mb-3 titulo-bold">ÚLTIMAS ENTRADAS</h3>
<div class="row">
{% for article in dates[:6] %}
{% include 'card.html' %}
{% endfor %}
<div class="pt-1 pb-1 blog-entries">
<div class="container">
{% block content_title %}
{% endblock %}
<div class="row flex-column-reverse flex-md-row">
<div class="col-4 col-12">
<h3 class="text-center pb-5 mb-3 titulo-bold">ÚLTIMAS ENTRADAS</h3>
<div class="row">
{% for article in dates[:6] %}
{% include 'card.html' %}
{% endfor %}
</div>
{% if dates|length > 6 %}
<div class="row pt-1 pb-5 justify-content-center">
<a href="{{ SITEURL }}/archives2.html" class="btn btn-primary">Leer más articulos</a>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>

</section><!-- /#content -->

Expand All @@ -37,7 +42,7 @@ <h2>Nuestros Patrocinantes</h2>
<p> ¿Te gustaría patrocinar las actividades de la comunidad Python Chile?</p>
<p> Contáctanos y te contamos como: contacto@pythonchile.cl
</div>
<!--
<!--
<div class="col-md-2 text-center">
<a href="https://it-talenthh.com/" target="_blank">
<img class="img-fluid" src="images/patrocinantes/logo_ittalent.png" alt="IT-Talent">
Expand All @@ -48,4 +53,4 @@ <h2>Nuestros Patrocinantes</h2>
</div>
</div>
</section>
{% endblock content %}
{% endblock content %}
10 changes: 5 additions & 5 deletions pycltheme/templates/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
{% set last_page = articles_paginator.page(articles_paginator.num_pages) %}
<p class="paginator">
{% if articles_page.has_previous() %}
<a href="{{ SITEURL }}/{{ first_page.url }}">&#8647;</a>
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&laquo;</a>
<a href="{{ SITEURL }}/{{ first_page.url }}">Inicio</a>
<a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&laquo;</a>
{% endif %}
Página {{ articles_page.number }} / {{ articles_paginator.num_pages }}
{% if articles_page.has_next() %}
<a href="{{ SITEURL }}/{{ articles_next_page.url }}">&raquo;</a>
<a href="{{ SITEURL }}/{{ last_page.url }}">&#8649;</a>
<a href="{{ SITEURL }}/{{ articles_next_page.url }}">&raquo;</a>
<a href="{{ SITEURL }}/{{ last_page.url }}">Final</a>
{% endif %}
</p>
{% endif %}
{% endif %}