2019-10-02 15:32:01 +02:00
|
|
|
import { useStaticQuery, graphql } from 'gatsby'
|
2019-10-28 23:00:55 +01:00
|
|
|
import { Site } from '../@types/Site'
|
2019-10-02 15:32:01 +02:00
|
|
|
|
2019-10-28 23:00:55 +01:00
|
|
|
export function useSiteMetadata(): Site {
|
2019-10-13 19:08:36 +02:00
|
|
|
const query = graphql`
|
|
|
|
query {
|
|
|
|
site {
|
|
|
|
siteMetadata {
|
|
|
|
siteTitle
|
|
|
|
siteTitleShort
|
|
|
|
siteDescription
|
|
|
|
siteUrl
|
|
|
|
author {
|
|
|
|
name
|
|
|
|
email
|
|
|
|
uri
|
|
|
|
twitter
|
|
|
|
github
|
|
|
|
facebook
|
|
|
|
bitcoin
|
|
|
|
ether
|
|
|
|
}
|
|
|
|
typekitID
|
|
|
|
menu {
|
|
|
|
title
|
|
|
|
link
|
|
|
|
}
|
|
|
|
rss
|
|
|
|
jsonfeed
|
|
|
|
itemsPerPage
|
|
|
|
repoContentPath
|
2019-10-02 15:32:01 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-10-13 19:08:36 +02:00
|
|
|
`
|
2019-10-02 15:32:01 +02:00
|
|
|
|
|
|
|
const { site } = useStaticQuery(query)
|
|
|
|
return site.siteMetadata
|
|
|
|
}
|