Skip to content

Commit d93e1d5

Browse files
authored
feat: order end users by weight (chronological) (#278)
Signed-off-by: Jaime Silvela <[email protected]>
1 parent 6bb0ca0 commit d93e1d5

File tree

5 files changed

+36
-2
lines changed

5 files changed

+36
-2
lines changed

content/end_users/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
build:
3+
list: never
4+
publishResources: false
5+
render: never
6+
---
7+
8+
# End Users section order
9+
10+
Each Markdown entry in the `end_users` directory (except this README file)
11+
should have a `weight` in the Hugo preamble, like so:
12+
13+
``` txt
14+
---
15+
title: Shinkansen
16+
image: logo/shinkansen.png
17+
homepage: https://shinkansen.finance/
18+
weight: 11
19+
---
20+
```
21+
22+
The weight should be computed so that entries are displayed in the End Users
23+
page in chronological order, the oldest entries at the top.
24+
25+
The entries in this directory are based in the CNPG [ADOPTERS.md](https://github.com/cloudnative-pg/cloudnative-pg/blob/e5ef2fdaccd2c8fbdbf319f1224a0f90bbcfed30/ADOPTERS.md)
26+
file.
27+
To ensure the weights of end-users don't need modification as more and more are
28+
added, we should use as `weight` of an end user, its ordering in the
29+
ADOPTERS file.
30+
31+
E.g. Shinkansen is in line 44, whereas EDB is in line 34. We subtract 33 so we
32+
begin at 1. So, for EDB `weight: 1`, and for Shinkansen, `weight: 11`.

content/end_users/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ If you want to add your organization, please open a pull request for the
1515
[ADOPTERS file](https://github.com/cloudnative-pg/cloudnative-pg/blob/main/ADOPTERS.md).
1616

1717

18-
Below is a list of several CloudNativePG end users, in alphabetical order.
18+
Below is a list of several CloudNativePG end users, in chronological order.

content/end_users/biganimal.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: BigAnimal
33
image: logo/biganimal.svg
44
homepage: https://biganimal.com
5+
weight: 1
56
---
67

78
BigAnimal is a fully managed database-as-a-service with built-in Oracle

content/end_users/shinkansen.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Shinkansen
33
image: logo/shinkansen.png
44
homepage: https://shinkansen.finance/
5+
weight: 11
56
---
67

78
Shinkansen moves your money at the speed of the internet

layouts/paged_content/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ <h2 class="text-xl mt-6">{{.Title}}</h2>
55
<p>{{.Content}}</p>
66

77
{{ $ps := .Paginate (union .Pages .Sections) }}
8-
{{ range sort $ps.Pages "Title" }}
8+
{{ range sort $ps.Pages "Weight" }}
99
<hr>
1010
{{ if .Params.image }}
1111
<a href="{{ .Params.homepage }}">

0 commit comments

Comments
 (0)