mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
parser: Handle org-mode filetags as slice
This adds support for filetags by slicing them according to [the org mode tag specification](https://orgmode.org/guide/Tags.html). Can be used to create taxonomies based on org-mode tags
This commit is contained in:
@@ -131,6 +131,8 @@ func TestUnmarshalToInterface(t *testing.T) {
|
||||
{[]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(`#+FILETAGS: :work:`), ORG, map[string]any{"filetags": []string{"work"}}},
|
||||
{[]byte(`#+FILETAGS: :work:fun:`), ORG, map[string]any{"filetags": []string{"work", "fun"}}},
|
||||
{[]byte(`#+PUBLISHDATE: <2020-06-26 Fri>`), ORG, map[string]any{"publishdate": "2020-06-26"}},
|
||||
{[]byte(`#+EXPIRYDATE: <2020-06-26 Fri>`), ORG, map[string]any{"expirydate": "2020-06-26"}},
|
||||
{[]byte(`a = "b"`), TOML, expect},
|
||||
|
Reference in New Issue
Block a user