mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-10 04:22:06 +00:00
Added sitemap support, improved tags and description, preload 3rd party sites
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
siteMetadata: {
|
||||
title: `Unicorn Utterances`,
|
||||
description: `Learning programming from magically majestic words`,
|
||||
description: `Learning programming from magically majestic words. A place to learn about all sorts of programming topics from entry-level concepts to advanced abstractions`,
|
||||
siteUrl: `https://unicorn-utterances.com/`,
|
||||
disqusShortname: "unicorn-utterances",
|
||||
repoPath: "crutchcorn/unicorn-utterances",
|
||||
@@ -224,6 +224,7 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
},
|
||||
`gatsby-plugin-sitemap`
|
||||
],
|
||||
mapping: {
|
||||
"MarkdownRemark.frontmatter.author": `AuthorsJson`,
|
||||
|
||||
924
package-lock.json
generated
924
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -23,6 +23,7 @@
|
||||
"gatsby-plugin-react-svg": "^2.1.1",
|
||||
"gatsby-plugin-sass": "^2.1.0",
|
||||
"gatsby-plugin-sharp": "^2.2.1",
|
||||
"gatsby-plugin-sitemap": "^2.2.1",
|
||||
"gatsby-plugin-transition-link": "^1.12.4",
|
||||
"gatsby-remark-autolink-headers": "^2.1.0",
|
||||
"gatsby-remark-copy-linked-files": "^2.1.0",
|
||||
|
||||
@@ -55,6 +55,7 @@ export const SearchField = ({ className, onSearch = () => {} }) => {
|
||||
<div style={{ height: inputHeight }}/>
|
||||
<PosedInput placeholder={placeholder}
|
||||
ref={inputRef}
|
||||
aria-label="Search for posts"
|
||||
onChange={e => {
|
||||
const val = e.target.value;
|
||||
setInputVal(val)
|
||||
|
||||
@@ -4,9 +4,8 @@ import BackIcon from "../../assets/icons/back.svg"
|
||||
import layoutStyles from "./layout.module.scss"
|
||||
import "../../global.scss"
|
||||
|
||||
export const Layout = ({ location, title, children }) => {
|
||||
export const Layout = ({ location, children }) => {
|
||||
const rootPath = `${__PATH_PREFIX__}/`
|
||||
let header
|
||||
|
||||
const isBase = location.pathname === rootPath
|
||||
const isBlogPost = location.pathname.startsWith(`${rootPath}posts`)
|
||||
@@ -20,7 +19,6 @@ export const Layout = ({ location, title, children }) => {
|
||||
>
|
||||
<header className={layoutStyles.header}>
|
||||
{!isBase && <Link className={`${layoutStyles.backBtn} baseBtn`} to={`/`}><BackIcon/></Link>}
|
||||
{header}
|
||||
</header>
|
||||
<main className={!isBlogPost ? "listViewContent" : "postViewContent"}>{children}</main>
|
||||
<footer>
|
||||
|
||||
@@ -105,6 +105,11 @@ function SEO({
|
||||
}}
|
||||
title={title}
|
||||
titleTemplate={`%s | ${siteData.title}`}
|
||||
link={[
|
||||
{ rel: "icon", href: '/favicon.ico' },
|
||||
{ rel: "preconnect", href: 'https://www.google.com' },
|
||||
{ rel: "preconnect", href: 'https://marketingplatform.google.com' },
|
||||
]}
|
||||
meta={[
|
||||
{
|
||||
property: `og:url`,
|
||||
|
||||
@@ -25,7 +25,7 @@ const BlogIndex = (props) => {
|
||||
<PicTitleHeader
|
||||
image={data.file.childImageSharp.fixed}
|
||||
title="Unicorn Utterances"
|
||||
description="Learning programming from magically majestic words. A place to learn about all sorts of programming topics from entry-level concepts to advanced abstractions"
|
||||
description={data.site.siteMetadata.description}
|
||||
/>
|
||||
<PostList posts={posts} tags={postTags} />
|
||||
</div>
|
||||
@@ -40,6 +40,7 @@ export const pageQuery = graphql`
|
||||
site {
|
||||
siteMetadata {
|
||||
title
|
||||
description
|
||||
}
|
||||
}
|
||||
allMarkdownRemark(sort: { fields: [frontmatter___published], order: DESC }) {
|
||||
|
||||
Reference in New Issue
Block a user