From 7fae22267110bde22a8ac2946395b7610c0c7d17 Mon Sep 17 00:00:00 2001 From: Tyler Lawson Date: Sat, 26 Jun 2021 11:41:06 -0400 Subject: adding support for list with one level sublist --- exampleSite/data/content.yaml | 2 ++ layouts/partials/bullet-list.html | 16 ++++++++++++++++ layouts/partials/section.html | 16 ++-------------- 3 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 layouts/partials/bullet-list.html diff --git a/exampleSite/data/content.yaml b/exampleSite/data/content.yaml index 9feeb63..c05fa36 100644 --- a/exampleSite/data/content.yaml +++ b/exampleSite/data/content.yaml @@ -32,6 +32,8 @@ sections: enddate: Jun 2008 points: - 'Started in a comedy duo with Jack Burns, a fellow DJ from Texas' + - - Jack was pretty cool + - He was funny and stuff - >- Arrested with Lenny Bruce when he told the police that he did not believe in government issues IDs diff --git a/layouts/partials/bullet-list.html b/layouts/partials/bullet-list.html new file mode 100644 index 0000000..25b4832 --- /dev/null +++ b/layouts/partials/bullet-list.html @@ -0,0 +1,16 @@ +{{ with . }} + +{{ end }} diff --git a/layouts/partials/section.html b/layouts/partials/section.html index 6dcf406..c49bc51 100644 --- a/layouts/partials/section.html +++ b/layouts/partials/section.html @@ -1,13 +1,7 @@

{{ .heading }}

{{ with .body }}

{{ . }}

{{ end }} - {{ with .points }} - - {{ end }} + {{ partial "bullet-list.html" .points }} {{ range .subsections }}
{{ with .heading }} @@ -24,13 +18,7 @@ {{ . }}

{{ end }} - {{ with .points }} -
    - {{ range . }} -
  • {{ . | markdownify }}
  • - {{ end }} -
- {{ end }} + {{ partial "bullet-list.html" .points }}
{{ end }}
-- cgit v1.2.3