Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

Commit 0461f595 authored by Seth A Johnson's avatar Seth A Johnson
Browse files

add homepage markdown for tagline

parent fd9e326e
......@@ -27,9 +27,12 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
return
}
// filter out books, we don't make pages for those
// Filter out books, we don't make pages for those
// Also the home-page, or index.js. It just has pieces of content,
// not a generated page.
pages = results.data.allMarkdownRemark.edges.filter(edge => {
if (edge.node.frontmatter.templateKey === "book") {
if (edge.node.frontmatter.templateKey === "book" ||
edge.node.frontmatter.templateKey === "home-page") {
return false
} else {
return edge
......@@ -38,7 +41,6 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
pages.forEach(edge => {
const pathName = edge.node.frontmatter.path || edge.node.fields.slug;
console.log(pathName);
const component = path.resolve(`src/templates/${String(edge.node.frontmatter.templateKey)}.js`);
const id = edge.node.id
createPage({
......
......@@ -5,7 +5,6 @@ const Book = ({book}) => {
const {
title,
author,
description,
readLink,
buyLink,
cover
......@@ -20,7 +19,6 @@ const Book = ({book}) => {
<div className="card-body">
<h5 className="card-title">{title}</h5>
<h5 className="card-title">{author}</h5>
{/* <p className="card-text">{description}</p> */}
<a className="card-link" href={readLink}>Read</a>
<a className="card-link" href={buyLink}>Buy</a>
</div>
......
......@@ -3,12 +3,11 @@ import {graphql, useStaticQuery, Link} from 'gatsby'
export const titleQuery = graphql`
{
site {
siteMetadata {
title
}
site {
siteMetadata {
title
}
}
}
`
......@@ -21,7 +20,7 @@ const Footer = () => {
<ul className="lever-footer-links">
<li>
<Link to="/">
Lever Press
{title}
</Link>
</li>
</ul>
......
---
templateKey: home-page
---
......@@ -2,18 +2,31 @@ import React from "react"
import Layout from "../components/layout"
import SEO from "../components/seo"
import Title from "../components/title"
import BookList from "../components/books/bookList"
import {graphql} from "gatsby"
const IndexPage = () => (
<Layout>
<SEO title="Home" />
<div className="index-grid">
<div className="books">
<BookList />
export const IndexQuery = graphql`
{
content: markdownRemark(frontmatter: { templateKey: { eq: "home-page" } }) {
frontmatter{
templateKey
}
}
}
`
const IndexPage = ({data}) => {
return (
<Layout>
<SEO title="Home" />
<div className="index-grid">
<div className="books">
<BookList />
</div>
</div>
</div>
</Layout>
)
</Layout>
)
}
export default IndexPage
......@@ -49,6 +49,16 @@ collections:
- name: pages
label: Pages
files:
- file: src/content/home.md
name: home
label: Home
fields:
- { name: templateKey, label: "Template Key", widget: hidden, default: home-page }
- name: tagline_section
label: "Tag Line Section"
widget: object
fields:
- { name: text, label: Text, widget: markdown }
- file: "src/content/about.md"
name: about
label: About
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment