From 5510480c224e5c889a1e1a77e3e2637688b68110 Mon Sep 17 00:00:00 2001 From: BernatBC Date: Tue, 6 Feb 2024 09:33:02 +0100 Subject: [PATCH 1/2] Add featured posts in mainpage --- data/en/sections/featured-posts.yaml | 13 +++++++++++++ data/en/sections/recent-posts.yaml | 2 +- data/es/sections/featured-posts.yaml | 13 +++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 data/en/sections/featured-posts.yaml create mode 100644 data/es/sections/featured-posts.yaml diff --git a/data/en/sections/featured-posts.yaml b/data/en/sections/featured-posts.yaml new file mode 100644 index 00000000..9ec0251a --- /dev/null +++ b/data/en/sections/featured-posts.yaml @@ -0,0 +1,13 @@ +section: + name: Featured Posts # Title of section (default: "") + id: featured-posts # url id/slug of section *Required* + enable: true # Boolean to determine if this section is enabled (default: false) + weight: 6 # Order to display section in (default: alphabetical followed by weight) + showOnNavbar: true # Boolean to determine if a link should be shown for this section on the navbar + hideTitle: false # Can optionally hide the title in sections (default: false) + +# posts to feature +posts: + - quickstart + - update-v3-to-v4 + - prepare-site \ No newline at end of file diff --git a/data/en/sections/recent-posts.yaml b/data/en/sections/recent-posts.yaml index 520f3ffd..fef0533f 100644 --- a/data/en/sections/recent-posts.yaml +++ b/data/en/sections/recent-posts.yaml @@ -3,7 +3,7 @@ section: name: Recent Posts id: recent-posts enable: true - weight: 5 + weight: 6 showOnNavbar: true # Can optionally hide the title in sections # hideTitle: true diff --git a/data/es/sections/featured-posts.yaml b/data/es/sections/featured-posts.yaml new file mode 100644 index 00000000..b1375076 --- /dev/null +++ b/data/es/sections/featured-posts.yaml @@ -0,0 +1,13 @@ +section: + name: Publicaciones Destacadas # Title of section (default: "") + id: featured-posts # url id/slug of section *Required* + enable: true # Boolean to determine if this section is enabled (default: false) + weight: 5 # Order to display section in (default: alphabetical followed by weight) + showOnNavbar: true # Boolean to determine if a link should be shown for this section on the navbar + hideTitle: false # Can optionally hide the title in sections (default: false) + +# posts to feature +posts: + - quickstart + - update-v3-to-v4 + - prepare-site \ No newline at end of file From c9a8a2b77229ee205e0dae1b7ce7ec9fe2378b8f Mon Sep 17 00:00:00 2001 From: BernatBC Date: Tue, 6 Feb 2024 09:41:07 +0100 Subject: [PATCH 2/2] Add featured posts guide --- .../sections/featured-posts/hero.svg | 1 + .../featured-posts/images/recent-posts.svg | 1 + .../sections/featured-posts/index.es.md | 32 +++++++++++++++++++ .../sections/featured-posts/index.md | 29 +++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 content/posts/configuration/sections/featured-posts/hero.svg create mode 100644 content/posts/configuration/sections/featured-posts/images/recent-posts.svg create mode 100644 content/posts/configuration/sections/featured-posts/index.es.md create mode 100644 content/posts/configuration/sections/featured-posts/index.md diff --git a/content/posts/configuration/sections/featured-posts/hero.svg b/content/posts/configuration/sections/featured-posts/hero.svg new file mode 100644 index 00000000..0f742c3b --- /dev/null +++ b/content/posts/configuration/sections/featured-posts/hero.svg @@ -0,0 +1 @@ +blogging \ No newline at end of file diff --git a/content/posts/configuration/sections/featured-posts/images/recent-posts.svg b/content/posts/configuration/sections/featured-posts/images/recent-posts.svg new file mode 100644 index 00000000..b657f475 --- /dev/null +++ b/content/posts/configuration/sections/featured-posts/images/recent-posts.svg @@ -0,0 +1 @@ +festivities \ No newline at end of file diff --git a/content/posts/configuration/sections/featured-posts/index.es.md b/content/posts/configuration/sections/featured-posts/index.es.md new file mode 100644 index 00000000..40066897 --- /dev/null +++ b/content/posts/configuration/sections/featured-posts/index.es.md @@ -0,0 +1,32 @@ +--- +title: "Configurando la sección de Publicaciones Destacadas" +date: 2024-02-06T06:20:34+06:00 +author: + name: BernatBC + image: images/author/bernatbc.png +menu: + sidebar: + name: Sección de Publicaciones Destacadas + identifier: featured-posts-section + parent: sections + weight: 150 +--- + +La sección de `Publicaciones Destacadas` sirve para mostrar las publicaciones que quieras. Para habilitar esta sección, crea un archivo `featured-posts.yaml` dentro del directorio `data/es/sections` e incluye el siguiente contenido: + +```yaml +# Información de la sección +section: + name: Publicaciones DestacadAS # Título de la sección + id: featured-posts # id del url de la sección *se requiere* + enable: true # Booleano que determina si la sección está activada (predeterminado: false) + weight: 6 # Orden de la sección (predeterminado: alfabeticamente seguida del peso) + showOnNavbar: true # Booleano que determina si el enlace de esta sección debe aparecer en la barra de navegación + hideTitle: true # Opcionalmente puede ocultar el título del menú (predeterminado: false) + +# publicaciones a destacar +posts: + - quickstart + - update-v3-to-v4 + - prepare-site +``` \ No newline at end of file diff --git a/content/posts/configuration/sections/featured-posts/index.md b/content/posts/configuration/sections/featured-posts/index.md new file mode 100644 index 00000000..9fd118ed --- /dev/null +++ b/content/posts/configuration/sections/featured-posts/index.md @@ -0,0 +1,29 @@ +--- +title: "Configuring Featured Posts Section" +date: 2024-02-06T06:20:34+06:00 +menu: + sidebar: + name: Featured Posts Section + identifier: fetured-posts-section + parent: sections + weight: 150 +--- + +The `Fetured Posts` section is used to showcase any post you like. To enable this section, create a `featured-posts.yaml` file in the `data/en/sections` directory and include the following content: + +```yaml +# section information +section: + name: Featured Posts # Title of section (default: "") + id: featured-posts # url id/slug of section *Required* + enable: true # Boolean to determine if this section is enabled (default: false) + weight: 6 # Order to display section in (default: alphabetical followed by weight) + showOnNavbar: true # Boolean to determine if a link should be shown for this section on the navbar + hideTitle: true # Can optionally hide the title in sections (default: false) + +# posts to feature +posts: + - quickstart + - update-v3-to-v4 + - prepare-site +```