From f1c985131f083ff55789020c9b1bd34a3cc580f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernat=20Borr=C3=A0s=20Civil?= <70479573+BernatBC@users.noreply.github.com> Date: Mon, 12 Feb 2024 08:49:04 +0100 Subject: [PATCH] Add featured posts section (#289) * Add max number of posts parameter * Put parameter under features * Add featured-posts section --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Emruz Hossain --- data/en/sections/accomplishments.yaml | 2 +- data/en/sections/achievements.yaml | 2 +- data/en/sections/featured-posts.yaml | 12 ++++++++++++ data/en/sections/recent-posts.yaml | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 data/en/sections/featured-posts.yaml diff --git a/data/en/sections/accomplishments.yaml b/data/en/sections/accomplishments.yaml index 03a433775e7..e748c27ba27 100644 --- a/data/en/sections/accomplishments.yaml +++ b/data/en/sections/accomplishments.yaml @@ -3,7 +3,7 @@ section: name: Accomplishments id: accomplishments enable: true - weight: 8 + weight: 9 showOnNavbar: true # Can optionally hide the title in sections # hideTitle: true diff --git a/data/en/sections/achievements.yaml b/data/en/sections/achievements.yaml index 6e3580fe194..e015ebab3ff 100644 --- a/data/en/sections/achievements.yaml +++ b/data/en/sections/achievements.yaml @@ -3,7 +3,7 @@ section: name: Achievements id: achievements enable: true - weight: 9 + weight: 10 showOnNavbar: true # Can optionally hide the title in sections # hideTitle: true diff --git a/data/en/sections/featured-posts.yaml b/data/en/sections/featured-posts.yaml new file mode 100644 index 00000000000..78306b8bffc --- /dev/null +++ b/data/en/sections/featured-posts.yaml @@ -0,0 +1,12 @@ +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: 7 # 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: + - markdown-sample + - shortcodes \ No newline at end of file diff --git a/data/en/sections/recent-posts.yaml b/data/en/sections/recent-posts.yaml index b551819effd..25f9ba09361 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: 7 + weight: 8 showOnNavbar: true # Can optionally hide the title in sections # hideTitle: true