Repository: gohugoio/hugo (language: go)

Issue:
support repeated keywords in org mode files as arrays
Hello! 

Could we be able to specify array values in org mode content over multiple lines instead of suffixing the keywords with `[]`. This would make the syntax less odd aesthetically (imo), and also allow terms to have spaces in them which is already the case for the other markup languages.

I've accidentally and pre-emptively submitted an [implementation](https://github.com/gohugoio/hugo/pull/11741) when I should've created a proposal first. 

The goal would be these two front matters are equivalent.

```org
#+categories: foo bar
#+categories: baz
```

```md
+++
categories = ['foo bar', 'baz']
+++
```

Thanks!


Discussion / hints:

Fix patch:
diff --git a/docs/content/en/content-management/front-matter.md b/docs/content/en/content-management/front-matter.md
index dba67ba1073..7593fb75971 100644
--- a/docs/content/en/content-management/front-matter.md
+++ b/docs/content/en/content-management/front-matter.md
@@ -31,7 +31,7 @@ JSON
 
 ORG
 : a group of Org mode keywords in the format '`#+KEY: VALUE`'. Any line that does not start with `#+` ends the front matter section.
-  Keyword values can be either strings (`#+KEY: VALUE`) or a whitespace separated list of strings (`#+KEY[]: VALUE_1 VALUE_2`).
+  Array values can either be separated into multiple lines (`#+KEY: VALUE_1` and `#+KEY: VALUE_2`) or a whitespace separated list of strings (`#+KEY[]: VALUE_1 VALUE_2`).
 
 ### Example
 
diff --git a/parser/metadecoders/decoder.go b/parser/metadecoders/decoder.go
index 40b3a336ced..0e300f61bde 100644
--- a/parser/metadecoders/decoder.go
+++ b/parser/metadecoders/decoder.go
@@ -242,9 +242,8 @@ func (d Decoder) unmarshalORG(data []byte, v any) error {
 		k = strings.ToLower(k)
 		if strings.HasSuffix(k, "[]") {
 			frontMatter[k[:len(k)-2]] = strings.Fields(v)
-		} else if k == "tags" || k == "categories" || k == "aliases" {
-			log.Printf("warn: Please use '#+%s[]:' notation, automatic conversion is deprecated.", k)
-			frontMatter[k] = strings.Fields(v)
+		} else if strings.Contains(v, "\n") {
+			frontMatter[k] = strings.Split(v, "\n")
 		} else if k == "date" || k == "lastmod" || k == "publishdate" || k == "expirydate" {
 			frontMatter[k] = parseORGDate(v)
 		} else {


Test patch:
diff --git a/parser/metadecoders/decoder_test.go b/parser/metadecoders/decoder_test.go
index ff6f8c226a0..48def7d1244 100644
--- a/parser/metadecoders/decoder_test.go
+++ b/parser/metadecoders/decoder_test.go
@@ -125,6 +125,7 @@ func TestUnmarshalToInterface(t *testing.T) {
 		{[]byte(``), JSON, map[string]any{}},
 		{[]byte(nil), JSON, map[string]any{}},
 		{[]byte(`#+a: b`), ORG, expect},
+		{[]byte("#+a: foo bar\n#+a: baz"), ORG, map[string]any{"a": []string{string("foo bar"), string("baz")}}},
 		{[]byte(`#+DATE: <2020-06-26 Fri>`), ORG, map[string]any{"date": "2020-06-26"}},
 		{[]byte(`#+LASTMOD: <2020-06-26 Fri>`), ORG, map[string]any{"lastmod": "2020-06-26"}},
 		{[]byte(`#+PUBLISHDATE: <2020-06-26 Fri>`), ORG, map[string]any{"publishdate": "2020-06-26"}},