summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro <[email protected]>2024-07-31 17:25:22 -0600
committerAlejandro <[email protected]>2024-07-31 17:25:22 -0600
commitf2e0eaaca8fad98f07d290a5c0ef9b160b8c1688 (patch)
treee8edb370aef206eee45a331703f657cf31f9938b
parent20b51e32ea8ebe331213c6de45edd452741a2267 (diff)
added: shortcode for listing news
-rw-r--r--content/es/_index.md4
-rw-r--r--layouts/shortcodes/list-noticias.html8
2 files changed, 12 insertions, 0 deletions
diff --git a/content/es/_index.md b/content/es/_index.md
index 41c4322..885b836 100644
--- a/content/es/_index.md
+++ b/content/es/_index.md
@@ -1,3 +1,7 @@
+# Noticias
+
+{{< list-noticias >}}
+
# ¿Quiénes somos?
La Facultad de Informática desde su creación en el año de 1987 ha trabajado de forma decidida en la formación de profesionales de las TIC's acorde a los requerimientos de la sociedad y la industria.
diff --git a/layouts/shortcodes/list-noticias.html b/layouts/shortcodes/list-noticias.html
new file mode 100644
index 0000000..f1ce843
--- /dev/null
+++ b/layouts/shortcodes/list-noticias.html
@@ -0,0 +1,8 @@
+<ul class="news">
+{{ $p := where site.Pages "Params.tags" "intersect" (slice "noticia") }}
+{{ range $p }}
+
+<li> <a href="{{.RelPermalink}}"> {{- if .Param "datesinlist" }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006 Jan 02" }}</time> &ndash; {{ end -}} {{.Title}}</a></li>
+
+{{ end }}
+</ul>