diff options
author | Alejandro <[email protected]> | 2024-07-31 17:25:22 -0600 |
---|---|---|
committer | Alejandro <[email protected]> | 2024-07-31 17:25:22 -0600 |
commit | f2e0eaaca8fad98f07d290a5c0ef9b160b8c1688 (patch) | |
tree | e8edb370aef206eee45a331703f657cf31f9938b | |
parent | 20b51e32ea8ebe331213c6de45edd452741a2267 (diff) |
added: shortcode for listing news
-rw-r--r-- | content/es/_index.md | 4 | ||||
-rw-r--r-- | layouts/shortcodes/list-noticias.html | 8 |
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> – {{ end -}} {{.Title}}</a></li> + +{{ end }} +</ul> |