From c495b5aab88643e63b2e7db107237505253016ce Mon Sep 17 00:00:00 2001 From: Will Faught Date: Mon, 3 Jun 2024 23:27:27 -0700 Subject: [PATCH] Require alert config object --- README.md | 1 - .../content/{complex-alert.md => alert.md} | 10 +++++----- exampleSite/content/content/link.md | 2 +- exampleSite/content/content/simple-alert.md | 18 ------------------ exampleSite/content/content/video.md | 2 +- layouts/partials/paige/alert.html | 6 +----- 6 files changed, 8 insertions(+), 31 deletions(-) rename exampleSite/content/content/{complex-alert.md => alert.md} (77%) delete mode 100644 exampleSite/content/content/simple-alert.md diff --git a/README.md b/README.md index 6d63e905..3be564a7 100644 --- a/README.md +++ b/README.md @@ -298,7 +298,6 @@ Parameters specific to pages: link = "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title [paige] -alert = "Alert!" # Markdown displayed before the page body (defaults to primary alert type) pin = true # Display this page before the rest [paige.alert] diff --git a/exampleSite/content/content/complex-alert.md b/exampleSite/content/content/alert.md similarity index 77% rename from exampleSite/content/content/complex-alert.md rename to exampleSite/content/content/alert.md index 8cbeebdb..b978e9a5 100644 --- a/exampleSite/content/content/complex-alert.md +++ b/exampleSite/content/content/alert.md @@ -2,14 +2,14 @@ authors: ["will-faught"] categories: ["content", "paige"] date: "2023-09-18T21:21:05-07:00" -description: "A complex alert." +description: "An alert." paige: alert: message: "Get more information here." - type: "danger" + type: "primary" tags: ["alerts"] -title: "Complex Alert" -weight: 70 +title: "Alert" +weight: 60 --- This page has the following parameters: @@ -18,5 +18,5 @@ This page has the following parameters: paige: alert: message: "Get more information here." - type: "danger" + type: "primary" ``` diff --git a/exampleSite/content/content/link.md b/exampleSite/content/content/link.md index 798522e5..e4191f9b 100644 --- a/exampleSite/content/content/link.md +++ b/exampleSite/content/content/link.md @@ -6,7 +6,7 @@ description: "A front matter link." link: "https://willfaught.com/paige" tags: ["link"] title: "Link" -weight: 80 +weight: 70 --- It takes you to the home page. diff --git a/exampleSite/content/content/simple-alert.md b/exampleSite/content/content/simple-alert.md deleted file mode 100644 index 2c5c9154..00000000 --- a/exampleSite/content/content/simple-alert.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -authors: ["will-faught"] -categories: ["content", "paige"] -date: "2023-09-18T21:33:35-07:00" -description: "A simple alert." -paige: - alert: "Get more information here." -tags: ["alerts"] -title: "Simple Alert" -weight: 60 ---- - -This page has the following parameters: - -```yaml -paige: - alert: "Get more information here." -``` diff --git a/exampleSite/content/content/video.md b/exampleSite/content/content/video.md index e0faf60c..890287ad 100644 --- a/exampleSite/content/content/video.md +++ b/exampleSite/content/content/video.md @@ -5,7 +5,7 @@ date: "2023-09-24T21:29:31-07:00" description: "Only a video." tags: ["video"] title: "Video" -weight: 90 +weight: 80 --- {{< paige/youtube "dQw4w9WgXcQ" >}} diff --git a/layouts/partials/paige/alert.html b/layouts/partials/paige/alert.html index 76254397..9d8edd66 100644 --- a/layouts/partials/paige/alert.html +++ b/layouts/partials/paige/alert.html @@ -1,9 +1,5 @@ {{ $page := . }} {{ with $page.Param "paige.alert" }} - {{ if reflect.IsMap . }} - - {{ else }} - - {{ end }} + {{ end }}