diff --git a/gatsby-theme-academic/src/components/PageFragments/HomePage/SelectedResearch.jsx b/gatsby-theme-academic/src/components/PageFragments/HomePage/SelectedResearch.jsx index 28505f30..4a3d97a7 100644 --- a/gatsby-theme-academic/src/components/PageFragments/HomePage/SelectedResearch.jsx +++ b/gatsby-theme-academic/src/components/PageFragments/HomePage/SelectedResearch.jsx @@ -22,10 +22,8 @@ const SelectedResearch = () => { allMdx( filter: { fileAbsolutePath: { regex: "/research\/.*\/index\\.md$/" } - fields: { - slug: { - selected: { eq: true } - } + frontmatter: { + selected: { eq: true } } } sort: { fields: [frontmatter___priority, frontmatter___title], order: ASC } @@ -49,16 +47,12 @@ const SelectedResearch = () => { excerpt selected priority - } - fileAbsolutePath - fields { - slug { - links { - name - url - } + links { + name + url } } + fileAbsolutePath } } } diff --git a/gatsby-theme-academic/src/components/Panel/index.jsx b/gatsby-theme-academic/src/components/Panel/index.jsx index 17a56afc..0852f314 100644 --- a/gatsby-theme-academic/src/components/Panel/index.jsx +++ b/gatsby-theme-academic/src/components/Panel/index.jsx @@ -30,7 +30,7 @@ const Panel = (props) => { } else { nextSelectedTags.add(tagName); } - // console.log('You are interested in: ', nextSelectedTags); + console.log('You are interested in: ', nextSelectedTags); setSelectedTags(nextSelectedTags); }; @@ -51,13 +51,13 @@ const Panel = (props) => { if (data.allMdx) { data.allMdx.edges.forEach((val) => { - if (!val.node || !val.node.fields || !val.node.fields.slug - || !val.node.fields.slug.tags) { + console.log(val.node); + if (!val.node || !val.node.frontmatter || !val.node.frontmatter.tags) { // eslint-disable-next-line no-param-reassign val.tags = new Set(); } else { // eslint-disable-next-line no-param-reassign - val.tags = new Set(val.node.fields.slug.tags); + val.tags = new Set(val.node.frontmatter.tags); } }); } diff --git a/gatsby-theme-academic/src/components/ResearchCard/index.jsx b/gatsby-theme-academic/src/components/ResearchCard/index.jsx index e8f07747..e75f65f7 100644 --- a/gatsby-theme-academic/src/components/ResearchCard/index.jsx +++ b/gatsby-theme-academic/src/components/ResearchCard/index.jsx @@ -18,8 +18,8 @@ import * as style from './researchCard.module.less'; const ResearchCard = (props) => { const { data: { node }, tagsMap } = props; const { - fields: { slug: { links } }, frontmatter: { - title, authors, excerpt, path, date, tags, venue, cover, + frontmatter: { + title, authors, excerpt, path, date, tags, venue, cover, links, }, } = node; const fluid = cover ? cover.childImageSharp.fluid : null; diff --git a/gatsby-theme-academic/src/pages/index.jsx b/gatsby-theme-academic/src/pages/index.jsx index d504551c..392708d5 100644 --- a/gatsby-theme-academic/src/pages/index.jsx +++ b/gatsby-theme-academic/src/pages/index.jsx @@ -10,7 +10,7 @@ import Footer from '../components/PageLayout/Footer'; import Header from '../components/PageLayout/Header'; import SidebarWrapper from '../components/PageLayout/Sidebar'; -export default ({ data }) => ( +export default () => (
@@ -18,68 +18,9 @@ export default ({ data }) => ( - +