Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Commit

Permalink
hestiaHUGO: set to use RFC5322 time format while being backward compa…
Browse files Browse the repository at this point in the history
…tible

Appearently, Debian has the potential of dumping weird date output
format that is not consistent. Hence, let's use RFC5322 format
instead.

This patch set to use RFC5322 time format while being backward compatible
in hestiaHUGO/ directory.

Co-authored-by: Shuralyov, Jean <jean.shuralyov@proton.me>
Co-authored-by: Galyna, Cory <cory.galyna@zoralab.com>
Co-authored-by: (Holloway) Chew, Kean Ho <kean.ho.chew@zoralab.com>
Signed-off-by: (Holloway) Chew, Kean Ho <kean.ho.chew@zoralab.com>
  • Loading branch information
3 people committed Jun 24, 2023
1 parent 77262e2 commit 6100b53
Show file tree
Hide file tree
Showing 98 changed files with 503 additions and 479 deletions.
6 changes: 3 additions & 3 deletions hestiaHUGO/archetypes/hestia/__page.toml
Expand Up @@ -3,10 +3,10 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = ''
Published = ''
Expand Down
28 changes: 26 additions & 2 deletions hestiaHUGO/layouts/partials/hestiaTIME/Sanitize
Expand Up @@ -66,7 +66,9 @@ specific language governing permissions and limitations under the License.

{{- /* initialize .Time data type */ -}}
{{- if and (not $error) $dataList -}}
{{- $ret = split $dataList " " -}}
{{- $ret = strings.Replace $dataList "," "" -}}
{{- $ret = split $ret " " -}}

{{- if eq (len $ret) 7 -}}
{{- $data = dict
"Day" (index $ret 1)
Expand All @@ -75,7 +77,17 @@ specific language governing permissions and limitations under the License.
"Time" (index $ret 4)
"Zone" (index $ret 6)
-}}
{{- else if eq (len $ret) 6 -}}
{{- $data = dict
"Day" (index $ret 1)
"Month" (index $ret 2)
"Year" (index $ret 3)
"Time" (index $ret 4)
"Zone" (index $ret 5)
-}}
{{- end -}}

{{- if $data -}}
{{- if eq (upper $data.Month) "JAN" -}}
{{- $data = merge $data (dict "Month" "01") -}}
{{- else if eq (upper $data.Month) "FEB" -}}
Expand Down Expand Up @@ -104,7 +116,19 @@ specific language governing permissions and limitations under the License.
{{- $data = merge $data (dict "Month" "01") -}}
{{- end -}}

{{- $ret = printf "%s-%s-%sT%s%s:00"
{{- if not $data.Zone -}}
{{- $data = merge $data (dict
"Zone" "+0000"
) -}}
{{- else -}}
{{- range $i := seq (sub 5 (len $data.Zone)) -}}
{{- $data = merge $data (dict
"Zone" (printf "%s0" $data.Zone)
) -}}
{{- end -}}
{{- end -}}

{{- $ret = printf "%s-%s-%sT%s%s"
$data.Year
$data.Month
$data.Day
Expand Down
10 changes: 5 additions & 5 deletions sites/content/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Tue 20 Dec 2022 12:49:49 PM +08'
Published = 'Tue 20 Dec 2022 12:49:49 PM +08'
Created = 'Tue, 20 Dec 2022 12:49:49 +0800'
Published = 'Tue, 20 Dec 2022 12:49:49 +0800'



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/404/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = "Tue 20 Dec 2022 12:49:49 PM +08"
Published = "Tue 20 Dec 2022 12:49:49 PM +08"
Created = "Tue, 20 Dec 2022 12:49:49 +0800"
Published = "Tue, 20 Dec 2022 12:49:49 +0800"



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Tue 20 Dec 2022 12:49:49 PM +08'
Published = 'Tue 20 Dec 2022 12:49:49 PM +08'
Created = 'Tue, 20 Dec 2022 12:49:49 +0800'
Published = 'Tue, 20 Dec 2022 12:49:49 +0800'



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/getting-started/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Sat 24 Dec 2022 01:43:36 PM +08'
Published = 'Sat 24 Dec 2022 01:43:36 PM +08'
Created = 'Sat, 24 Dec 2022 01:43:36 +0800'
Published = 'Sat, 24 Dec 2022 01:43:36 +0800'



Expand Down
Expand Up @@ -211,8 +211,8 @@ Code = """
...
[Date]
Created = 'Sat 05 Mar 2023 11:22:21 AM +08' # update to today's time obviously
Published = 'Sat 05 Mar 2023 11:22:21 AM +08' # update to today's time obviously
Created = 'Sat, 05 Mar 2023 11:22:21 +0800' # update to today's time obviously
Published = 'Sat, 05 Mar 2023 11:22:21 +0800' # update to today's time obviously
...
Expand Down
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Sat 05 Mar 2023 11:22:21 AM +08'
Published = 'Sat 05 Mar 2023 11:22:21 AM +08'
Created = 'Sat, 05 Mar 2023 11:22:21 +0800'
Published = 'Sat, 05 Mar 2023 11:22:21 +0800'



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/getting-started/setup-hugo/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Sat 04 Mar 2023 10:46:33 AM +08'
Published = 'Sat 04 Mar 2023 10:46:33 AM +08'
Created = 'Sat, 04 Mar 2023 10:46:33 +0800'
Published = 'Sat, 04 Mar 2023 10:46:33 +0800'



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/licenses/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Mon 19 Dec 2022 12:31:12 PM +08'
Published = 'Mon 19 Dec 2022 12:31:12 PM +08'
Created = 'Mon, 19 Dec 2022 12:31:12 +0800'
Published = 'Mon, 19 Dec 2022 12:31:12 +0800'



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/releases/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Sat 24 Dec 2022 02:14:30 PM +08'
Published = 'Sat 24 Dec 2022 02:14:30 PM +08'
Created = 'Sat, 24 Dec 2022 02:14:30 +0800'
Published = 'Sat, 24 Dec 2022 02:14:30 +0800'



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/releases/v1p0p0/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Thu 09 Feb 2023 05:54:30 AM +08'
Published = 'Thu 09 Feb 2023 05:54:30 AM +08'
Created = 'Thu, 09 Feb 2023 05:54:30 +0800'
Published = 'Thu, 09 Feb 2023 05:54:30 +0800'



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/releases/v1p1p0/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Fri 24 Feb 2023 11:55:22 AM +08'
Published = 'Fri 24 Feb 2023 11:55:22 AM +08'
Created = 'Fri, 24 Feb 2023 11:55:22 +0800'
Published = 'Fri, 24 Feb 2023 11:55:22 +0800'



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/releases/v1p2p0/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Thu 01 Jun 2023 11:21:10 AM +08'
Published = 'Thu 01 Jun 2023 11:21:10 AM +08'
Created = 'Thu, 01 Jun 2023 11:21:10 +0800'
Published = 'Thu, 01 Jun 2023 11:21:10 +0800'



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/specs/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Thu 08 Dec 2022 05:55:06 PM +08'
Published = 'Thu 08 Dec 2022 05:55:06 PM +08'
Created = 'Thu, 08 Dec 2022 05:55:06 +0800'
Published = 'Thu, 08 Dec 2022 05:55:06 +0800'



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/specs/hestiaGUI/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Fri 02 Jun 2023 10:18:34 AM +08'
Published = 'Fri 02 Jun 2023 10:18:34 AM +08'
Created = 'Fri, 02 Jun 2023 10:18:34 +0800'
Published = 'Fri, 02 Jun 2023 10:18:34 +0800'



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/specs/hestiaGUI/googleFONT_NOTOSANS/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = "Sun 18 Dec 2022 02:10:21 PM +08"
Published = "Sun 18 Dec 2022 02:10:21 PM +08"
Created = "Sun, 18 Dec 2022 02:10:21 +0800"
Published = "Sun, 18 Dec 2022 02:10:21 +0800"



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/specs/hestiaGUI/shieldsBADGE/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = "Mon 12 Dec 2022 05:32:05 PM +08"
Published = "Mon 12 Dec 2022 05:32:05 PM +08"
Created = "Mon, 12 Dec 2022 05:32:05 +0800"
Published = "Mon, 12 Dec 2022 05:32:05 +0800"



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/specs/hestiaGUI/zoralabANCHOR/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = "Sun 18 Dec 2022 06:08:22 PM +08"
Published = "Sun 18 Dec 2022 06:08:22 PM +08"
Created = "Sun, 18 Dec 2022 06:08:22 +0800"
Published = "Sun, 18 Dec 2022 06:08:22 +0800"



Expand Down
10 changes: 5 additions & 5 deletions sites/content/en/specs/hestiaGUI/zoralabARROW/__page.toml
Expand Up @@ -3,13 +3,13 @@
# Date fields.
#
# NOTE:
# 1. You can generate date easily on linux using '$ date' command.
# 1. You can generate date easily on linux using '$ date --rfc-email' command.
# 2. If date field is left blank, the current time shall be used instead.
# 3. Date should ONLY comply to this pattern when manually constructed:
# Thu 21 Jul 2022 14:27:39 PM +08
# 3. Date should ONLY comply to RFC5322 format when manually constructed:
# Thu, 21 Jul 2022 14:27:39 +0800
[Date]
Created = 'Fri 23 Jun 2023 10:18:05 AM +08'
Published = 'Fri 23 Jun 2023 10:18:05 AM +08'
Created = 'Fri, 23 Jun 2023 10:18:05 +0800'
Published = 'Fri, 23 Jun 2023 10:18:05 +0800'



Expand Down

0 comments on commit 6100b53

Please sign in to comment.