diff --git a/gatsby-config.js b/gatsby-config.js index 53fa2af1ca..4588ad9004 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -338,7 +338,7 @@ module.exports = { query: ` { allMarkdownRemark(filter: {fields: {sourceInstanceName: {eq: "blog"} - }, frontmatter: {disable:{ne: true},featuredBlog: {ne: true}}}, + }, frontmatter: {disable:{ne: true}}}, sort: {frontmatter: {date: DESC}}) { nodes { id @@ -377,80 +377,6 @@ module.exports = { })), }, }, - { - resolve: 'gatsby-plugin-paginated-collection', - options: { - name: 'others-posts', - pageSize: 12, - query: ` - { - allMarkdownRemark(filter: {fields: {sourceInstanceName: {eq: "blog"} - }, frontmatter: {disable:{ne: true},tags: {nin: [ - "opensource", - "hpe-ezmeral-container-platform", - "spiffe-and-spire-projects", - "hpe-ezmeral-data-fabric", - "hpe-greenlake", - "chapel", - "grommet", - "hpe-alletra", - "kubedirector" - "deep-learning-cookbook", - "hpe-3par-and-primera", - "hpe-nimble-storage", - "hpe-oneview", - "hpe-oneview-global-dashboard", - "ilo", - "ilorest", - "iLOrest", - "ilo-restful-api", - "Redfish", - "hpe-ezmeral", - "determined-ai", - "cray", - "swarm-learning", - "dragonhpc", - "hpe-nonstop", - "hpe-opsramp", - "morpheus" - ]}}}, sort: {frontmatter: {date: DESC}}) { - nodes { - id - fields { - slug - sourceInstanceName - } - frontmatter { - title - date - description - author - tags - authorimage - externalLink - } - excerpt - } - } - } - `, - normalizer: ({ data }) => - data.allMarkdownRemark.nodes.map((node) => ({ - id: node.id, - title: node.frontmatter.title, - date: node.frontmatter.date, - description: node.excerpt, - author: node.frontmatter.author, - tags: node.frontmatter.tags, - authorimage: node.frontmatter.authorimage, - externalLink: node.frontmatter.externalLink, - fields: { - slug: node.fields.slug, - sourceInstanceName: node.fields.sourceInstanceName, - }, - })), - }, - }, paginatedCollection('opensource-blog-posts', 'opensource'), paginatedCollection('ezmeral-blog-posts', 'hpe-ezmeral'), paginatedCollection('spiffe-blog-posts', 'spiffe-and-spire-projects'), diff --git a/gatsby-node.js b/gatsby-node.js index d569cef728..c9ef785a54 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -228,10 +228,6 @@ exports.createPages = async ({ graphql, actions }) => { // paginatedCollectionQuery('morpheus'), // ); - const othersQueryResult = await graphql( - paginatedCollectionQuery('others-posts'), - ); - setPagination(allQueryResult); setPagination(openSourceQueryResult); setPagination(ezmeralRuntimeQueryResult); @@ -259,8 +255,6 @@ exports.createPages = async ({ graphql, actions }) => { setPagination(hpeNonStopQueryResult); // setPagination(hpeOpsrampQueryResult); // setPagination(hpeMorpheusQueryResult); - setPagination(othersQueryResult); - return graphql(` { allMarkdownRemark( diff --git a/src/components/BlogTabs/index.js b/src/components/BlogTabs/index.js index 9bdd99fd4a..5dc8420708 100644 --- a/src/components/BlogTabs/index.js +++ b/src/components/BlogTabs/index.js @@ -45,7 +45,6 @@ function BlogTabs({ data, columns }) { const totalAllBlogsCount = data.allBlogsCount.totalCount; const totalOpenSourceBlogsCount = data.openSourceBlogsCount.totalCount; const totalGreenLakeBlogsCount = data.greenlakeBlogsCount.totalCount; - const totalOthersBlogsCount = data.othersBlogsCount.totalCount; useEffect(() => { // loads persisted platform data when the user goes back to the blog page @@ -199,7 +198,7 @@ function BlogTabs({ data, columns }) { }); const previousTabContent = (previousTabIndex) => { - const { allBlogs, openSourceBlogs, greenlakeBlogs, othersBlogs } = data; + const { allBlogs, openSourceBlogs, greenlakeBlogs } = data; switch (previousTabIndex) { case 0: return allBlogs; @@ -207,8 +206,6 @@ function BlogTabs({ data, columns }) { return greenlakeBlogs; case 2: return openSourceBlogs; - case 3: - return othersBlogs; default: return allBlogs; } @@ -340,16 +337,6 @@ function BlogTabs({ data, columns }) { setPreviousTab={setPreviousTab} /> */} - - - ); } @@ -403,7 +390,6 @@ BlogTabs.propTypes = { allBlogs: blogsPropType, openSourceBlogs: blogsPropType, greenlakeBlogs: blogsPropType, - othersBlogs: blogsPropType, allBlogsCount: PropTypes.objectOf(PropTypes.number), openSourceBlogsCount: PropTypes.objectOf(PropTypes.number), ezmeralBlogsCount: PropTypes.objectOf(PropTypes.number), @@ -429,7 +415,6 @@ BlogTabs.propTypes = { hpeNonstopBlogsCount: PropTypes.objectOf(PropTypes.number), hpeOpsRampBlogsCount: PropTypes.objectOf(PropTypes.number), hpeMorpheusBlogsCount: PropTypes.objectOf(PropTypes.number), - othersBlogsCount: PropTypes.objectOf(PropTypes.number), }).isRequired, columns: PropTypes.shape({ small: PropTypes.string, diff --git a/src/pages/blog/index.js b/src/pages/blog/index.js index 31e8379b04..72cd6c497d 100644 --- a/src/pages/blog/index.js +++ b/src/pages/blog/index.js @@ -173,7 +173,7 @@ export const pageQuery = graphql` allBlogsCount: allMarkdownRemark( filter: { fields: { sourceInstanceName: { eq: "blog" } } - frontmatter: { featuredBlog: { ne: true }, disable: { ne: true } } + frontmatter: { disable: { ne: true } } } sort: { frontmatter: { date: DESC } } ) { @@ -789,51 +789,5 @@ export const pageQuery = graphql` id } } - othersBlogs: paginatedCollectionPage( - collection: { name: { eq: "others-posts" } } - index: { eq: 0 } - ) { - nodes - hasNextPage - nextPage { - id - } - collection { - id - } - } - othersBlogsCount: allMarkdownRemark( - filter: { - fields: { sourceInstanceName: { eq: "blog" } } - frontmatter: { - disable: { ne: true } - tags: { - nin: [ - "opensource" - "hpe-ezmeral-container-platform" - "hpe-ezmeral" - "spiffe-and-spire-projects" - "hpe-ezmeral-data-fabric" - "hpe-greenlake" - "chapel" - "grommet" - "hpe-alletra" - "deep-learning-cookbook" - "hpe-3par-and-primera" - "hpe-nimble-storage" - "hpe-oneview" - "hpe-oneview-global-dashboard" - "ilo" - "data-services-cloud-console" - "determined-ai" - "cray" - ] - } - } - } - sort: { frontmatter: { date: DESC } } - ) { - totalCount - } } `;