Skip to content

Commit

Permalink
Bye bye bye news 👋 (#354)
Browse files Browse the repository at this point in the history
* Bye bye bye news 👋

* Update doctocat dependency

* Update to doctocat 4.4.4

* Fix incorrect version on doctocat but this still causes a header query field issue

* Define header in Gatsby config
  • Loading branch information
maximedegreve authored Jan 30, 2023
1 parent 9633ec5 commit ef63199
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 610 deletions.
5 changes: 5 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ const path = require('path')
module.exports = {
siteMetadata: {
title: 'Primer Design System',
header: {
title: 'Primer',
url: 'https://primer.style',
logoUrl: 'https://primer.style',
},
shortName: '',
description: 'The design system that powers GitHub',
imageUrl: 'https://user-images.githubusercontent.com/10384315/53922681-2f6d3100-402a-11e9-9719-5d1811c8110a.png',
Expand Down
21 changes: 0 additions & 21 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const redirects = require('./redirects')
const getReleases = require('@primer/releases')

exports.createPages = ({actions: {createRedirect}}) => {
for (const [fromPath, toPath] of Object.entries(redirects)) {
Expand All @@ -8,26 +7,6 @@ exports.createPages = ({actions: {createRedirect}}) => {
}
}

exports.sourceNodes = async ({actions: {createNode}, createContentDigest}) => {
const {releases} = await getReleases()

for (const release of releases) {
const node = {
...release,
id: `PrimerRelease ${release.title}`,
parent: null,
children: [],
internal: {
type: 'PrimerRelease',
mediaType: 'application/json',
content: JSON.stringify(release),
contentDigest: createContentDigest(release),
},
}
createNode(node)
}
}

exports.onCreateWebpackConfig = ({stage, loaders, actions}) => {
if (stage === 'build-html' || stage === 'develop-html') {
actions.setWebpackConfig({
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"scripts": {
"start": "gatsby develop",
"build": "gatsby build",
"clean": "gatsby clean",
"now-dev": "gatsby develop -p $PORT",
"now-build": "npm run build",
"lint": "eslint *.js src"
Expand All @@ -12,10 +13,9 @@
"@mdx-js/react": "^1.0.27",
"@primer/component-metadata": "^0.5.1",
"@primer/css": "^20.4.2",
"@primer/gatsby-theme-doctocat": "^4.2.3",
"@primer/gatsby-theme-doctocat": "^4.4.0",
"@primer/octicons-react": "^17.7.0",
"@primer/react": "^35.2.2",
"@primer/releases": "0.0.0-634eadc",
"@svgr/webpack": "^4.3.2",
"gatsby": "^2.13.39",
"gatsby-plugin-manifest": "^2.2.4",
Expand Down
86 changes: 0 additions & 86 deletions src/components/Article.js

This file was deleted.

63 changes: 0 additions & 63 deletions src/components/NewsList.js

This file was deleted.

57 changes: 0 additions & 57 deletions src/data/posts.yml

This file was deleted.

27 changes: 0 additions & 27 deletions src/data/releases.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function Index() {
const Promo = ({title, href, image: Image = 'div', children, ...rest}) => (
<Box pr={[0, 0, gutter]} mb={[6, 6, 8]} width={[1, 1, 1 / 2, 1 / 3]} {...rest}>
<Link sx={{display: 'block', mb: 1}} href={href}>
<Box as={Image} bg="black" border={0} borderRadius={2} width="100%" height={null} minHeight={220} />
<Box as={Image} bg="black" border={0} borderRadius={2} width="100%" height={null} />
</Link>
<Heading fontSize={4}>
<Link sx={{color: 'inherit', underline: false}} href={href}>
Expand Down
86 changes: 0 additions & 86 deletions src/pages/news.js

This file was deleted.

Loading

0 comments on commit ef63199

Please sign in to comment.