diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml index c6f3eb5..b8b5ec2 100644 --- a/.github/workflows/release-notes.yml +++ b/.github/workflows/release-notes.yml @@ -95,6 +95,7 @@ jobs: title: "Release of BlueZ ${NEW_TAG}" date: ${TODAY} summary: "BlueZ ${NEW_TAG} has been released with improvements and bug fixes." + image: "images/news/release.png" draft: false --- FRONTMATTER diff --git a/.gitignore b/.gitignore index 0fcb5b2..0208400 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ # Hugo's output directory public/ +# Hugo's generated resource cache +resources/_gen/ # Hugo's build lock .hugo_build.lock diff --git a/README.md b/README.md index a83b010..fc2a1c6 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,11 @@ Write the article body in Markdown below the front matter. Fenced code blocks ar Place news images in `assets/images/news/` and reference them by filename in the front matter fields above. +`hugo.toml` is the single configuration point for automatic card images: + +- `defaultNewsImage` is used by articles without an `image` value. +- `weeklyReportImages` is the ordered, circular list used for weekly reports. Add, remove, or rename entries to change the rotation and its count. + --- ## Deployment diff --git a/assets/images/news/audio.png b/assets/images/news/audio.png new file mode 100644 index 0000000..4ae84ff Binary files /dev/null and b/assets/images/news/audio.png differ diff --git a/assets/images/news/bluetooth-hardware.png b/assets/images/news/bluetooth-hardware.png new file mode 100644 index 0000000..cc47b95 Binary files /dev/null and b/assets/images/news/bluetooth-hardware.png differ diff --git a/assets/images/news/documentation.png b/assets/images/news/documentation.png new file mode 100644 index 0000000..ce1dfa8 Binary files /dev/null and b/assets/images/news/documentation.png differ diff --git a/assets/images/news/mailing-list-1.png b/assets/images/news/mailing-list-1.png new file mode 100644 index 0000000..379a7e1 Binary files /dev/null and b/assets/images/news/mailing-list-1.png differ diff --git a/assets/images/news/mailing-list-2.png b/assets/images/news/mailing-list-2.png new file mode 100644 index 0000000..6884501 Binary files /dev/null and b/assets/images/news/mailing-list-2.png differ diff --git a/assets/images/news/mailing-list-3.png b/assets/images/news/mailing-list-3.png new file mode 100644 index 0000000..ae2c326 Binary files /dev/null and b/assets/images/news/mailing-list-3.png differ diff --git a/assets/images/news/release.png b/assets/images/news/release.png new file mode 100644 index 0000000..105c547 Binary files /dev/null and b/assets/images/news/release.png differ diff --git a/content/news/2022/bluez-5-66-release.md b/content/news/2022/bluez-5-66-release.md index a609762..9e25da9 100644 --- a/content/news/2022/bluez-5-66-release.md +++ b/content/news/2022/bluez-5-66-release.md @@ -2,6 +2,7 @@ title: "Release of BlueZ 5.66" date: 2022-11-14 summary: "This release mainly includes the initial support of BAP (Basic Audio Profile) which is an essential part of LE Audio responsible for stream control and VCP (Volume Control Profile). For MGMT, new MGMT opcodes are..." +image: "images/news/release.png" --- This release mainly includes the initial support of BAP (Basic Audio Profile) which is an essential part of LE Audio responsible for stream control and VCP (Volume Control Profile). For MESH, new MGMT opcodes are added to share one controller between the legacy bluetooth daemon and the mesh daemon. This release also includes various bug fixes in A2DP, GATT, HOG diff --git a/content/news/2022/le-audio-pipewire.md b/content/news/2022/le-audio-pipewire.md index 0f7753f..05272df 100644 --- a/content/news/2022/le-audio-pipewire.md +++ b/content/news/2022/le-audio-pipewire.md @@ -2,6 +2,7 @@ title: "LE Audio support in PipeWire" date: 2022-11-14 summary: "Since version 0.3.59, PipeWire supports LE Audio's Basic Audio Profile (BAP) for Connected Isochronous Streams (CIS) with the Low Complexity Communication Codec (LC3), see ..." +image: "images/news/audio.png" --- diff --git a/content/news/2022/le-audio-support.md b/content/news/2022/le-audio-support.md index c8b46d4..2893d20 100644 --- a/content/news/2022/le-audio-support.md +++ b/content/news/2022/le-audio-support.md @@ -2,6 +2,7 @@ title: "LE Audio Support" date: 2022-11-14 summary: "From release 5.66, the initial support for BAP (Basic Audio Profile) which is an essential part of LE Audio responsible for stream control is added." +image: "images/news/audio.png" --- diff --git a/content/news/2026/bluez-5-87-release.md b/content/news/2026/bluez-5-87-release.md index b9d1fe9..4cb615b 100644 --- a/content/news/2026/bluez-5-87-release.md +++ b/content/news/2026/bluez-5-87-release.md @@ -2,6 +2,7 @@ title: "Release of BlueZ 5.87" date: 2026-07-07 summary: "BlueZ 5.87 has been released with improvements and bug fixes." +image: "images/news/release.png" draft: false --- diff --git a/hugo.toml b/hugo.toml index c9fbb34..3b527ec 100644 --- a/hugo.toml +++ b/hugo.toml @@ -5,6 +5,13 @@ title = 'BlueZ - Official Linux Bluetooth Protocol Stack' [params] description = 'BlueZ is the official Linux Bluetooth protocol stack. It is flexible, efficient and uses a modular implementation.' copyrightYearStart = 2000 + defaultNewsImage = 'images/news/bluetooth-hardware.png' + # Ordered card images for weekly reports; image index = (week number - 1) modulo list length. + weeklyReportImages = [ + 'images/news/mailing-list-1.png', + 'images/news/mailing-list-2.png', + 'images/news/mailing-list-3.png', + ] [pagination] pagerSize = 12 diff --git a/layouts/news/list.html b/layouts/news/list.html index f91c213..fecfcf4 100644 --- a/layouts/news/list.html +++ b/layouts/news/list.html @@ -14,18 +14,7 @@

{{ .Title }}

{{ range $paginator.Pages }}
- {{ with .Params.image }} - {{ $img := resources.Get . }} - {{ if $img }} -
- {{ $.Title }} -
- {{ else }} -
- {{ end }} - {{ else }} -
- {{ end }} + {{ partial "news-card-image.html" . }}

{{ .Title }}

{{ .Params.summary }}

diff --git a/layouts/news/single.html b/layouts/news/single.html index 7794af1..efef484 100644 --- a/layouts/news/single.html +++ b/layouts/news/single.html @@ -40,18 +40,7 @@

{{ .Title }}

{{ range $related }}
- {{ with .Params.image }} - {{ $img := resources.Get . }} - {{ if $img }} -
- {{ $.Title }} -
- {{ else }} -
- {{ end }} - {{ else }} -
- {{ end }} + {{ partial "news-card-image.html" . }}

{{ .Title }}

{{ .Params.summary }}

diff --git a/layouts/partials/news-card-image.html b/layouts/partials/news-card-image.html new file mode 100644 index 0000000..f6ca641 --- /dev/null +++ b/layouts/partials/news-card-image.html @@ -0,0 +1,31 @@ +{{- $page := . -}} +{{- $imagePath := $page.Params.image -}} +{{- if not $imagePath -}} + {{- if hasPrefix $page.File.BaseFileName "weekly-report-w" -}} + {{- $weeklyReportImages := $page.Site.Params.weeklyReportImages -}} + {{- if gt (len $weeklyReportImages) 0 -}} + {{- $week := int (replaceRE "^0+" "" (replace $page.File.BaseFileName "weekly-report-w" "")) -}} + {{- $imagePath = index $weeklyReportImages (mod (sub $week 1) (len $weeklyReportImages)) -}} + {{- else -}} + {{- $imagePath = $page.Site.Params.defaultNewsImage -}} + {{- end -}} + {{- else -}} + {{- $imagePath = $page.Site.Params.defaultNewsImage -}} + {{- end -}} +{{- end -}} +{{- $img := resources.Get $imagePath -}} +
+ {{- with $img }} + {{- $small := .Resize "500x webp q82" -}} + {{- $large := .Resize "1000x webp q82" -}} + + {{- end }} +
\ No newline at end of file diff --git a/layouts/partials/news.html b/layouts/partials/news.html index 9bbbd2f..053087d 100644 --- a/layouts/partials/news.html +++ b/layouts/partials/news.html @@ -7,18 +7,7 @@

Latest news

{{ range first 3 $news }}