Added open graph data.

This commit is contained in:
JesseBrault0709 2024-06-10 13:59:39 +02:00
parent 840e1e19fd
commit 99846f05f2
24 changed files with 122 additions and 13 deletions

View File

@ -5,9 +5,11 @@ import groowt.view.component.web.BaseWebViewComponent
class Head extends BaseWebViewComponent { class Head extends BaseWebViewComponent {
final String title final String title
final Object openGraph
Head(Map attr) { Head(Map attr) {
title = attr.title title = attr.title
openGraph = attr.openGraph?.call() ?: ''
} }
} }

View File

@ -4,6 +4,7 @@ import com.jessebrault.ssg.di.Global
import groowt.view.component.web.BaseWebViewComponent import groowt.view.component.web.BaseWebViewComponent
import groowt.view.component.web.WebViewComponent import groowt.view.component.web.WebViewComponent
import jakarta.inject.Inject import jakarta.inject.Inject
import org.jetbrains.annotations.Nullable
import java.time.LocalDate import java.time.LocalDate
import java.time.format.DateTimeFormatter import java.time.format.DateTimeFormatter
@ -13,6 +14,7 @@ class StandardPage extends BaseWebViewComponent {
final String spotifyUrl final String spotifyUrl
final String youtubeUrl final String youtubeUrl
final String title final String title
final @Nullable Closure<WebViewComponent> openGraph
final Closure<WebViewComponent> banner final Closure<WebViewComponent> banner
final List<String> pageScripts final List<String> pageScripts
@ -21,6 +23,7 @@ class StandardPage extends BaseWebViewComponent {
this.spotifyUrl = spotifyUrl this.spotifyUrl = spotifyUrl
this.youtubeUrl = youtubeUrl this.youtubeUrl = youtubeUrl
this.title = attr.title this.title = attr.title
this.openGraph = attr.openGraph
this.banner = attr.banner ?: { '' } this.banner = attr.banner ?: { '' }
this.pageScripts = attr.pageScripts ?: [] this.pageScripts = attr.pageScripts ?: []
} }

View File

@ -0,0 +1,32 @@
package com.jessebrault.site.util
import groowt.view.component.web.BaseWebViewComponent
import jakarta.inject.Inject
import jakarta.inject.Named
import org.jetbrains.annotations.Nullable
class OpenGraph extends BaseWebViewComponent {
final String title
final String type
final String image
final @Nullable String description
private final String baseUrl
private final String path
@Inject
OpenGraph(@Named('baseUrl') String baseUrl, Map attr) {
this.baseUrl = baseUrl
title = attr.title
type = attr.type
image = attr.image
description = attr.description
path = attr.path
}
String getUrl() {
baseUrl + path
}
}

View File

@ -4,6 +4,7 @@ package com.jessebrault.site
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<% children -> children << openGraph %>
<title>$title</title> <title>$title</title>

View File

@ -5,7 +5,7 @@ import com.jessebrault.site.icon.SpotifyIcon
import com.jessebrault.site.icon.YoutubeIcon import com.jessebrault.site.icon.YoutubeIcon
--- ---
<html lang="en"> <html lang="en">
<Head title={title} /> <Head title={title} openGraph={openGraph} />
<body> <body>
<div class="header-banner-container"> <div class="header-banner-container">
<Header /> <Header />

View File

@ -0,0 +1,8 @@
---
package com.jessebrault.site.util
---
<meta property="og:title" content={title} />
<meta property="og:type" content={type} />
<meta property="og:image" content={image} />
<WhenNotNull item={description} render={<meta property="og:description" content={it} />} />
<meta property="og:url" content={url} />

View File

@ -10,13 +10,13 @@ import jakarta.inject.Inject
@PageSpec(name = 'Biography', path = '/') @PageSpec(name = 'Biography', path = '/')
class BiographyPage extends WvcPageView { class BiographyPage extends WvcPageView {
final Text biography
private final TitleMaker titleMaker private final TitleMaker titleMaker
private final Text biography
@Inject @Inject
BiographyPage(TitleMaker titleMaker, @InjectText('/Biography.md') Text biography) { BiographyPage(TitleMaker titleMaker, @InjectText('/Biography.md') Text biography) {
this.titleMaker = titleMaker
this.biography = biography this.biography = biography
this.titleMaker = titleMaker
} }
String renderBiography() { String renderBiography() {

View File

@ -1,6 +1,8 @@
package com.jessebrault.site.composition package com.jessebrault.site.composition
import com.jessebrault.site.util.TitleMaker import com.jessebrault.site.util.TitleMaker
import com.jessebrault.ssg.di.SelfPage
import com.jessebrault.ssg.page.Page
import com.jessebrault.ssg.view.WvcPageView import com.jessebrault.ssg.view.WvcPageView
import groovy.transform.Canonical import groovy.transform.Canonical
import jakarta.inject.Inject import jakarta.inject.Inject
@ -16,13 +18,16 @@ class CompositionPage extends WvcPageView {
} }
Composition composition Composition composition
final Page selfPage
private final TitleMaker titleMaker private final TitleMaker titleMaker
private final CompositionContainer compositionContainer private final CompositionContainer compositionContainer
@Inject @Inject
CompositionPage(TitleMaker titleMaker, CompositionContainer compositionContainer) { CompositionPage(TitleMaker titleMaker, CompositionContainer compositionContainer, @SelfPage Page selfPage) {
this.titleMaker = titleMaker this.titleMaker = titleMaker
this.compositionContainer = compositionContainer this.compositionContainer = compositionContainer
this.selfPage = selfPage
} }
String getTitle() { String getTitle() {

View File

@ -1,6 +1,5 @@
package com.jessebrault.site.composition package com.jessebrault.site.composition
import com.jessebrault.site.CompositionsPage
import com.jessebrault.ssg.page.Page import com.jessebrault.ssg.page.Page
import com.jessebrault.ssg.page.PageFactory import com.jessebrault.ssg.page.PageFactory
import com.jessebrault.ssg.view.WvcCompiler import com.jessebrault.ssg.view.WvcCompiler

View File

@ -2,8 +2,18 @@
package com.jessebrault.site package com.jessebrault.site
import com.jessebrault.site.composition.CompositionCategory import com.jessebrault.site.composition.CompositionCategory
import com.jessebrault.site.util.OpenGraph
--- ---
<StandardPage title={title}> <StandardPage
title={title}
openGraph={<OpenGraph
title="Compositions"
type="website"
image="https://jessebrault.nyc3.cdn.digitaloceanspaces.com/images/portrait1.jpg"
description="Compositions by Jesse Brault."
path="/compositions"
/>}
>
<div class="article-container"> <div class="article-container">
<article class="compositions"> <article class="compositions">
<h1>Compositions</h1> <h1>Compositions</h1>

View File

@ -2,8 +2,20 @@
package com.jessebrault.site.biography package com.jessebrault.site.biography
import com.jessebrault.site.StandardPage import com.jessebrault.site.StandardPage
import com.jessebrault.site.util.OpenGraph
--- ---
<StandardPage title={title} banner={<BiographyBanner />} pageScripts={['/biography.js']}> <StandardPage
title={title}
openGraph={<OpenGraph
title="Biography"
type="website"
image="https://jessebrault.nyc3.cdn.digitaloceanspaces.com/images/portrait1.jpg"
description={"Conductor and composer Jesse Brault studied orchestral conducting at the Juilliard School with Maestros Alan Gilbert and James Ross."}
path="/"
/>}
banner={<BiographyBanner />}
pageScripts={['/biography.js']}
>
<div class="article-container"> <div class="article-container">
<article id="biography-article"> <article id="biography-article">
<%= renderBiography() %> <%= renderBiography() %>

View File

@ -3,8 +3,18 @@ package com.jessebrault.site.composition
import com.jessebrault.site.StandardPage import com.jessebrault.site.StandardPage
import com.jessebrault.site.util.MaybeExternalLink import com.jessebrault.site.util.MaybeExternalLink
import com.jessebrault.site.util.OpenGraph
--- ---
<StandardPage title={title}> <StandardPage
openGraph={<OpenGraph
title={composition.title}
type="website"
image="https://jessebrault.nyc3.cdn.digitaloceanspaces.com/images/portrait1.jpg"
description={composition.description}
path={selfPage.path}
/>}
title={title}
>
<div class="article-container"> <div class="article-container">
<a id="back-to-compositions" href="/compositions">Back to compositions</a> <a id="back-to-compositions" href="/compositions">Back to compositions</a>
<article> <article>

View File

@ -2,8 +2,20 @@
package com.jessebrault.site.contact package com.jessebrault.site.contact
import com.jessebrault.site.StandardPage import com.jessebrault.site.StandardPage
import com.jessebrault.site.util.OpenGraph
--- ---
<StandardPage title={title} banner={<ContactBanner />} pageScripts={['/contact.js']}> <StandardPage
title={title}
openGraph={<OpenGraph
title="Contact"
type="website"
image="https://jessebrault.nyc3.cdn.digitaloceanspaces.com/images/portrait2.jpg"
description="Contact information for Jesse Brault."
path="/contact"
/>}
banner={<ContactBanner />}
pageScripts={['/contact.js']}
>
<div class="article-container"> <div class="article-container">
<article class="contact"> <article class="contact">
<h1>Contact</h1> <h1>Contact</h1>

View File

@ -21,6 +21,7 @@ class Composition {
Map<String, String> recordings Map<String, String> recordings
Map<String, String> externalLinks Map<String, String> externalLinks
@Nullable String shortInfo @Nullable String shortInfo
@Nullable String description
LocalDate date LocalDate date
Set<String> categories Set<String> categories
} }

View File

@ -25,6 +25,7 @@ class CompositionContainer {
recordings: text.frontMatter.recordings ?: [:], recordings: text.frontMatter.recordings ?: [:],
externalLinks: text.frontMatter.externalLinks ?: [:], externalLinks: text.frontMatter.externalLinks ?: [:],
shortInfo: text.frontMatter.shortInfo, shortInfo: text.frontMatter.shortInfo,
description: text.frontMatter.description,
date: LocalDate.parse(text.frontMatter.date), date: LocalDate.parse(text.frontMatter.date),
categories: text.frontMatter.categories as Set<String> categories: text.frontMatter.categories as Set<String>
) )

View File

@ -10,13 +10,14 @@ recordings:
externalLinks: externalLinks:
'Musaics of the Bay': https://www.musaics.org/stayathomesymposium/20-arcadia 'Musaics of the Bay': https://www.musaics.org/stayathomesymposium/20-arcadia
Discussion: https://www.youtube.com/watch?v=y52TU2u1BnU Discussion: https://www.youtube.com/watch?v=y52TU2u1BnU
description: Commissioned by Musaics of the Bay, Arcadia was written in response to June Yokell's painting Paradise Lost.
shortInfo: 'Commissioned by <em>Musaics of the Bay</em>.' shortInfo: 'Commissioned by <em>Musaics of the Bay</em>.'
date: 2020-10-01 date: 2020-10-01
categories: categories:
- Chamber - Chamber
--- ---
_Arcadia_ was commissioned by _Musaics of the Bay_ and written in response to June _Arcadia_ was commissioned by _Musaics of the Bay_ and written in response to June
Yokell's painting entitled _Paradise Lost_. Yokell's painting _Paradise Lost_.
When I first saw her painting, I knew immediately that I must compose music from it. When I first saw her painting, I knew immediately that I must compose music from it.
The colors of the landscape spoke to me directly, reminding me of the geography of The colors of the landscape spoke to me directly, reminding me of the geography of

View File

@ -7,12 +7,13 @@ score: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/scores/capriccioso.pd
recordings: recordings:
Premiere: https://www.youtube.com/watch?v=TDfhT8TU4Ik Premiere: https://www.youtube.com/watch?v=TDfhT8TU4Ik
Audio: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/recordings/capriccioso.mp3 Audio: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/recordings/capriccioso.mp3
description: Commissioned by Musaics of the Bay, Capriccioso is a musical response to Carel Fabritius' 1654 painting The Goldfinch.
shortInfo: 'Commissioned by <em>Musaics of the Bay</em> and <em>Miniatures: Mauritshuis</em>.' shortInfo: 'Commissioned by <em>Musaics of the Bay</em> and <em>Miniatures: Mauritshuis</em>.'
date: 2021-11-01 date: 2021-11-01
categories: categories:
- Chamber - Chamber
--- ---
Capriccioso is a musical response to Carel Fabritius 1654 painting _The Goldfinch_, Capriccioso is a musical response to Carel Fabritius' 1654 painting _The Goldfinch_,
as well as the history surrounding the painting itself. as well as the history surrounding the painting itself.
Generally, the music is meant to evoke the playfulness of the small bird in the painting. Generally, the music is meant to evoke the playfulness of the small bird in the painting.

View File

@ -5,6 +5,8 @@ instrumentation: For two violins.
premiere: April 3, 2019, at Church of St. Paul the Apostle, New York, New York. premiere: April 3, 2019, at Church of St. Paul the Apostle, New York, New York.
score: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/scores/conversations.pdf score: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/scores/conversations.pdf
date: 2017-06-01 date: 2017-06-01
description: For Jocelyn Zhu and Mariella Haubs in commemoration of their 2017 Concerts for Compassion Tour, Conversations depicts a conversation between two people.
shortInfo: For Jocelyn Zhu and Mariella Haubs in commemoration of their 2017 <em>Concerts for Compassion</em> Tour.
categories: categories:
- Chamber - Chamber
--- ---

View File

@ -3,6 +3,8 @@ title: Four Pieces for Piano
slug: four-pieces-for-piano slug: four-pieces-for-piano
instrumentation: For solo piano. instrumentation: For solo piano.
score: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/scores/four-pieces-for-piano.pdf score: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/scores/four-pieces-for-piano.pdf
description: Written for Julia Hamos, each of the Four Pieces varies wildly in character.
shortInfo: Written for Julia Hamos.
date: 2019-05-01 date: 2019-05-01
categories: categories:
- Solo - Solo

View File

@ -4,6 +4,8 @@ slug: illuminatio
instrumentation: For solo piano and wind ensemble. instrumentation: For solo piano and wind ensemble.
premiere: March 17, 2013, Cannon Falls, Minnesota. premiere: March 17, 2013, Cannon Falls, Minnesota.
date: 2013-02-01 date: 2013-02-01
description: Written in response to 'Innovation in the Liberal Arts', St. Olaf College's 2012-13 campus theme, Illuminatio musically captures a heightening of awareness.
shortInfo: Sponsored by St. Olaf College's Collaborative Undergraduate Research and Inquiry program, 2012.
categories: categories:
- Wind Ensemble - Wind Ensemble
--- ---
@ -15,7 +17,7 @@ enlightening, that of becoming aware. The study of diverse lines of thought not
different pieces of knowledge, but it heightens ones perception of the world through experiencing different pieces of knowledge, but it heightens ones perception of the world through experiencing
many different perspectives of other human beings. The innovation is thus a change of the way one many different perspectives of other human beings. The innovation is thus a change of the way one
thinks about the process of learning in the liberal arts. _Illuminatio_ seeks to capture musically thinks about the process of learning in the liberal arts. _Illuminatio_ seeks to capture musically
this process of becoming aware. this process of expanding one's awareness.
The St. Olaf College Collaborative Undergraduate Research and Inquiry program sponsored my work on _Illuminatio_. The St. Olaf College Collaborative Undergraduate Research and Inquiry program sponsored my work on _Illuminatio_.

View File

@ -8,6 +8,7 @@ recordings:
Audio: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/recordings/near-under-far.mp3 Audio: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/recordings/near-under-far.mp3
externalLinks: externalLinks:
'Musaics of the Bay': https://www.musaics.org/stayathomesymposium/51-near-under-far 'Musaics of the Bay': https://www.musaics.org/stayathomesymposium/51-near-under-far
description: Based on Die blaue Eiche by Luc Tuymans, Near, Under, Far musically expresses the painting's loneliness and angularity.
shortInfo: Based on <em>Die blaue Eiche</em> by Luc Tuymans. shortInfo: Based on <em>Die blaue Eiche</em> by Luc Tuymans.
date: 2021-03-01 date: 2021-03-01
categories: categories:

View File

@ -6,6 +6,8 @@ premiere: November 11, 2018, at Marlboro College, Brattleboro, Vermont.
score: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/scores/sonata-shambhala.pdf score: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/scores/sonata-shambhala.pdf
externalLinks: externalLinks:
'Benjamin Hochman Discusses Sonata Shambhala': https://www.youtube.com/watch?v=leyqMdGyr8Q 'Benjamin Hochman Discusses Sonata Shambhala': https://www.youtube.com/watch?v=leyqMdGyr8Q
description: Written for Benjamin Hochman and based upon The Sacred Path of the Warrior by Chögyam Trungpa, Sonata Shambhala meditates upon the books themes of personal spiritual development.
shortInfo: Based upon <em>The Sacred Path of the Warrior</em> by Chögyam Trungpa.
date: 2018-09-01 date: 2018-09-01
categories: categories:
- Solo - Solo

View File

@ -8,11 +8,12 @@ score: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/scores/spirit-travels
recordings: recordings:
Audio: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/recordings/spirit-travels.mp3 Audio: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/recordings/spirit-travels.mp3
shortInfo: <em>In memoriam</em> Jane H. Kim. shortInfo: <em>In memoriam</em> Jane H. Kim.
description: Written in memoriam Jane H. Kim, Spirit Travels evokes the journeys of one's spirit through this world and the beyond.
date: 2023-12-01 date: 2023-12-01
categories: categories:
- Chamber - Chamber
--- ---
_Spirit Travels_ evokes the journeys of ones spirit through this world and the beyond. _Spirit Travels_ evokes the journeys of one's spirit through this world and the beyond.
It is a tone poem in two consecutive parts: the first is bright, colorful, and energetic, It is a tone poem in two consecutive parts: the first is bright, colorful, and energetic,
while the second is introspective and lyrical (and prominently features the piano). while the second is introspective and lyrical (and prominently features the piano).
Beside many common musical motives, a noble horn melody links both parts, suggesting both Beside many common musical motives, a noble horn melody links both parts, suggesting both

View File

@ -7,6 +7,7 @@ score: https://jessebrault.nyc3.cdn.digitaloceanspaces.com/scores/spirit-travels
recordings: recordings:
'Midi Mockup': https://jessebrault.nyc3.cdn.digitaloceanspaces.com/recordings/spirit-travels-orchestra-midi.mp3 'Midi Mockup': https://jessebrault.nyc3.cdn.digitaloceanspaces.com/recordings/spirit-travels-orchestra-midi.mp3
shortInfo: <em>In memoriam</em> Jane H. Kim. shortInfo: <em>In memoriam</em> Jane H. Kim.
description: Written in memoriam Jane H. Kim, Spirit Travels evokes the journeys of one's spirit through this world and the beyond.
date: 2024-02-20 date: 2024-02-20
categories: categories:
- Orchestra - Orchestra