Skip to content

Commit

Permalink
fix: Change osses category from output to project
Browse files Browse the repository at this point in the history
  • Loading branch information
bicstone committed Mar 23, 2024
1 parent fd20123 commit 2d36962
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion content
21 changes: 16 additions & 5 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ const config: GatsbyConfig = {
feeds: [
{
serialize: ({
query: { allOutput },
query: { allTimeline },
}: {
query: GatsbyPluginFeedQuery;
}) => {
return allOutput.nodes.map((node) => {
return allTimeline.nodes.map((node) => {
switch (node.__typename) {
case "Mdx":
return {
Expand All @@ -104,11 +104,22 @@ const config: GatsbyConfig = {
description: node.frontmatter.excerpt,
date: node.date,
};
case "ArticlesYaml":
case "SlidesYaml":
case "OssesYaml":
case "NotesYaml":
return {
guid: node.url ?? "",
title: node.title,
url: node.url ?? "",
description: "",
date: node.date,
};
default:
return {
guid: node.url,
guid: node.title,
title: node.title,
url: node.url,
url: SITE_METADATA.siteUrl,
description: "",
date: node.date,
};
Expand All @@ -117,7 +128,7 @@ const config: GatsbyConfig = {
},
query: /* GraphQL */ `
query GatsbyPluginFeed {
allOutput(sort: { date: DESC }) {
allTimeline(sort: { date: DESC }) {
nodes {
__typename
title
Expand Down
19 changes: 11 additions & 8 deletions src/generated/graphqlTypes.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2d36962

Please sign in to comment.