OpenGraph fallback image.
This commit is contained in:
parent
99846f05f2
commit
95447c6178
@ -1,5 +1,6 @@
|
|||||||
package com.jessebrault.site.util
|
package com.jessebrault.site.util
|
||||||
|
|
||||||
|
import com.jessebrault.ssg.di.Global
|
||||||
import groowt.view.component.web.BaseWebViewComponent
|
import groowt.view.component.web.BaseWebViewComponent
|
||||||
import jakarta.inject.Inject
|
import jakarta.inject.Inject
|
||||||
import jakarta.inject.Named
|
import jakarta.inject.Named
|
||||||
@ -16,11 +17,11 @@ class OpenGraph extends BaseWebViewComponent {
|
|||||||
private final String path
|
private final String path
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
OpenGraph(@Named('baseUrl') String baseUrl, Map attr) {
|
OpenGraph(@Named('baseUrl') String baseUrl, @Global('openGraphFallbackImage') String fallbackImage, Map attr) {
|
||||||
this.baseUrl = baseUrl
|
this.baseUrl = baseUrl
|
||||||
title = attr.title
|
title = attr.title
|
||||||
type = attr.type
|
type = attr.type
|
||||||
image = attr.image
|
image = attr.image ?: fallbackImage
|
||||||
description = attr.description
|
description = attr.description
|
||||||
path = attr.path
|
path = attr.path
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@ import com.jessebrault.site.util.OpenGraph
|
|||||||
openGraph={<OpenGraph
|
openGraph={<OpenGraph
|
||||||
title="Compositions"
|
title="Compositions"
|
||||||
type="website"
|
type="website"
|
||||||
image="https://jessebrault.nyc3.cdn.digitaloceanspaces.com/images/portrait1.jpg"
|
|
||||||
description="Compositions by Jesse Brault."
|
description="Compositions by Jesse Brault."
|
||||||
path="/compositions"
|
path="/compositions"
|
||||||
/>}
|
/>}
|
||||||
|
@ -9,7 +9,6 @@ import com.jessebrault.site.util.OpenGraph
|
|||||||
openGraph={<OpenGraph
|
openGraph={<OpenGraph
|
||||||
title="Biography"
|
title="Biography"
|
||||||
type="website"
|
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."}
|
description={"Conductor and composer Jesse Brault studied orchestral conducting at the Juilliard School with Maestros Alan Gilbert and James Ross."}
|
||||||
path="/"
|
path="/"
|
||||||
/>}
|
/>}
|
||||||
|
@ -9,7 +9,6 @@ import com.jessebrault.site.util.OpenGraph
|
|||||||
openGraph={<OpenGraph
|
openGraph={<OpenGraph
|
||||||
title={composition.title}
|
title={composition.title}
|
||||||
type="website"
|
type="website"
|
||||||
image="https://jessebrault.nyc3.cdn.digitaloceanspaces.com/images/portrait1.jpg"
|
|
||||||
description={composition.description}
|
description={composition.description}
|
||||||
path={selfPage.path}
|
path={selfPage.path}
|
||||||
/>}
|
/>}
|
||||||
|
@ -9,7 +9,6 @@ import com.jessebrault.site.util.OpenGraph
|
|||||||
openGraph={<OpenGraph
|
openGraph={<OpenGraph
|
||||||
title="Contact"
|
title="Contact"
|
||||||
type="website"
|
type="website"
|
||||||
image="https://jessebrault.nyc3.cdn.digitaloceanspaces.com/images/portrait2.jpg"
|
|
||||||
description="Contact information for Jesse Brault."
|
description="Contact information for Jesse Brault."
|
||||||
path="/contact"
|
path="/contact"
|
||||||
/>}
|
/>}
|
||||||
|
@ -20,6 +20,7 @@ build {
|
|||||||
youtubeUrl = 'https://www.youtube.com/@JesseBrault0709'
|
youtubeUrl = 'https://www.youtube.com/@JesseBrault0709'
|
||||||
linkedInUrl = 'https://www.linkedin.com/in/jessebrault0709/'
|
linkedInUrl = 'https://www.linkedin.com/in/jessebrault0709/'
|
||||||
githubUrl = 'https://github.com/JesseBrault0709'
|
githubUrl = 'https://github.com/JesseBrault0709'
|
||||||
|
openGraphFallbackImage = 'https://jessebrault.nyc3.cdn.digitaloceanspaces.com/images/portrait3.jpg'
|
||||||
}
|
}
|
||||||
objectFactoryBuilder.configure {
|
objectFactoryBuilder.configure {
|
||||||
configureRegistry {
|
configureRegistry {
|
||||||
|
Loading…
Reference in New Issue
Block a user