mirror of
https://github.com/kremalicious/blog.git
synced 2024-12-22 17:23:50 +01:00
empty related posts build fix
This commit is contained in:
parent
45592c8f30
commit
06285dfea0
@ -3,7 +3,6 @@ type: link
|
||||
|
||||
title: What makes Twitter Twitter?
|
||||
linkurl: http://alt.adrianshort.co.uk/blog/2012/06/30/what-makes-twitter-twitter/
|
||||
author: Matthias Kretschmann
|
||||
|
||||
date: 2012-07-07 08:18:58+00:00
|
||||
---
|
||||
|
@ -2,7 +2,7 @@ version: '3'
|
||||
services:
|
||||
blog:
|
||||
build: .
|
||||
command: npm run start:docker
|
||||
command: npm start
|
||||
volumes:
|
||||
- .:/blog
|
||||
- /blog/node_modules
|
||||
|
@ -233,5 +233,11 @@ module.exports = {
|
||||
'gatsby-plugin-offline',
|
||||
'gatsby-plugin-typescript',
|
||||
'gatsby-plugin-webpack-size'
|
||||
// {
|
||||
// resolve: 'gatsby-plugin-webpack-bundle-analyser-v2',
|
||||
// options: {
|
||||
// devMode: true
|
||||
// }
|
||||
// }
|
||||
]
|
||||
}
|
||||
|
112
package-lock.json
generated
112
package-lock.json
generated
@ -3824,6 +3824,18 @@
|
||||
"resolved": "https://registry.npmjs.org/better-queue-memory/-/better-queue-memory-1.0.4.tgz",
|
||||
"integrity": "sha512-SWg5wFIShYffEmJpI6LgbL8/3Dqhku7xI1oEiy6FroP9DbcZlG0ZDjxvPdP9t7hTGW40IpIcC6zVoGT1oxjOuA=="
|
||||
},
|
||||
"bfj": {
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/bfj/-/bfj-6.1.2.tgz",
|
||||
"integrity": "sha512-BmBJa4Lip6BPRINSZ0BPEIfB1wUY/9rwbwvIHQA1KjX9om29B6id0wnWXq7m3bn5JrUVjeOTnVuhPT1FiHwPGw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bluebird": "^3.5.5",
|
||||
"check-types": "^8.0.3",
|
||||
"hoopy": "^0.1.4",
|
||||
"tryer": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"big.js": {
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
|
||||
@ -4707,6 +4719,12 @@
|
||||
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
|
||||
"integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc="
|
||||
},
|
||||
"check-types": {
|
||||
"version": "8.0.3",
|
||||
"resolved": "https://registry.npmjs.org/check-types/-/check-types-8.0.3.tgz",
|
||||
"integrity": "sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ==",
|
||||
"dev": true
|
||||
},
|
||||
"cheerio": {
|
||||
"version": "1.0.0-rc.3",
|
||||
"resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.3.tgz",
|
||||
@ -6848,6 +6866,12 @@
|
||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
|
||||
},
|
||||
"ejs": {
|
||||
"version": "2.7.2",
|
||||
"resolved": "https://registry.npmjs.org/ejs/-/ejs-2.7.2.tgz",
|
||||
"integrity": "sha512-rHGwtpl67oih3xAHbZlpw5rQAt+YV1mSCu2fUZ9XNrfaGEhom7E+AUiMci+ByP4aSfuAWx7hE0BPuJLMrpXwOw==",
|
||||
"dev": true
|
||||
},
|
||||
"electron-to-chromium": {
|
||||
"version": "1.3.306",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.306.tgz",
|
||||
@ -10019,6 +10043,16 @@
|
||||
"terser": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"gatsby-plugin-webpack-bundle-analyser-v2": {
|
||||
"version": "1.1.8",
|
||||
"resolved": "https://registry.npmjs.org/gatsby-plugin-webpack-bundle-analyser-v2/-/gatsby-plugin-webpack-bundle-analyser-v2-1.1.8.tgz",
|
||||
"integrity": "sha512-xVC6JYP1n1CaLml9VTBqdrmBEkCUgcAk5jW8hpJVH9gAn3dVQYyOgUxAavi88ZBLN7Ff6M7uZ80COMRWtdlpbA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.7.2",
|
||||
"webpack-bundle-analyzer": "^3.6.0"
|
||||
}
|
||||
},
|
||||
"gatsby-plugin-webpack-size": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/gatsby-plugin-webpack-size/-/gatsby-plugin-webpack-size-1.0.0.tgz",
|
||||
@ -11247,6 +11281,12 @@
|
||||
"parse-passwd": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"hoopy": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz",
|
||||
"integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==",
|
||||
"dev": true
|
||||
},
|
||||
"hosted-git-info": {
|
||||
"version": "2.8.5",
|
||||
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz",
|
||||
@ -15895,6 +15935,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"opener": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/opener/-/opener-1.5.1.tgz",
|
||||
"integrity": "sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==",
|
||||
"dev": true
|
||||
},
|
||||
"opentracing": {
|
||||
"version": "0.14.4",
|
||||
"resolved": "https://registry.npmjs.org/opentracing/-/opentracing-0.14.4.tgz",
|
||||
@ -23279,6 +23325,12 @@
|
||||
"resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-2.2.1.tgz",
|
||||
"integrity": "sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q=="
|
||||
},
|
||||
"tryer": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz",
|
||||
"integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==",
|
||||
"dev": true
|
||||
},
|
||||
"ts-essentials": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-1.0.4.tgz",
|
||||
@ -24589,6 +24641,66 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"webpack-bundle-analyzer": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.6.0.tgz",
|
||||
"integrity": "sha512-orUfvVYEfBMDXgEKAKVvab5iQ2wXneIEorGNsyuOyVYpjYrI7CUOhhXNDd3huMwQ3vNNWWlGP+hzflMFYNzi2g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"acorn": "^6.0.7",
|
||||
"acorn-walk": "^6.1.1",
|
||||
"bfj": "^6.1.1",
|
||||
"chalk": "^2.4.1",
|
||||
"commander": "^2.18.0",
|
||||
"ejs": "^2.6.1",
|
||||
"express": "^4.16.3",
|
||||
"filesize": "^3.6.1",
|
||||
"gzip-size": "^5.0.0",
|
||||
"lodash": "^4.17.15",
|
||||
"mkdirp": "^0.5.1",
|
||||
"opener": "^1.5.1",
|
||||
"ws": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"acorn": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz",
|
||||
"integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==",
|
||||
"dev": true
|
||||
},
|
||||
"filesize": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz",
|
||||
"integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==",
|
||||
"dev": true
|
||||
},
|
||||
"gzip-size": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz",
|
||||
"integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"duplexer": "^0.1.1",
|
||||
"pify": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"pify": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
|
||||
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
|
||||
"dev": true
|
||||
},
|
||||
"ws": {
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
|
||||
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async-limiter": "~1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"webpack-dev-middleware": {
|
||||
"version": "3.7.2",
|
||||
"resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz",
|
||||
|
@ -7,8 +7,7 @@
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "gatsby develop",
|
||||
"start:docker": "gatsby develop --host 0.0.0.0",
|
||||
"start": "gatsby develop --host 0.0.0.0",
|
||||
"build": "gatsby build && npm run copy",
|
||||
"ssr": "npm run build && serve -s public/",
|
||||
"test": "npm run lint && jest --coverage",
|
||||
@ -113,6 +112,7 @@
|
||||
"eslint-plugin-prettier": "^3.1.1",
|
||||
"eslint-plugin-react": "^7.16.0",
|
||||
"fs-extra": "^8.1.0",
|
||||
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.8",
|
||||
"identity-obj-proxy": "^3.0.0",
|
||||
"jest": "^24.9.0",
|
||||
"markdownlint-cli": "^0.19.0",
|
||||
|
@ -7,15 +7,15 @@ import { ReactComponent as Jsonfeed } from '../../images/jsonfeed.svg'
|
||||
import { ReactComponent as Bitcoin } from '../../images/bitcoin.svg'
|
||||
import styles from './Icon.module.scss'
|
||||
|
||||
const Icon = ({ name }: { name: string }) => {
|
||||
const components: any = {
|
||||
Download: Feather.ArrowDownCircle,
|
||||
Blog: Feather.Edit,
|
||||
Keybase: Feather.Key,
|
||||
Jsonfeed,
|
||||
Bitcoin
|
||||
}
|
||||
const components: any = {
|
||||
Download: Feather.ArrowDownCircle,
|
||||
Blog: Feather.Edit,
|
||||
Keybase: Feather.Key,
|
||||
Jsonfeed,
|
||||
Bitcoin
|
||||
}
|
||||
|
||||
const Icon = ({ name }: { name: string }) => {
|
||||
const IconMapped = components[name]
|
||||
const Icon = (Feather as any)[name]
|
||||
|
||||
|
@ -74,10 +74,11 @@ export default function RelatedPosts({
|
||||
function getPosts() {
|
||||
return photos
|
||||
? photosWithDataFilter(posts)
|
||||
: postsWithDataFilter(posts, 'tags', tags)
|
||||
: tags && postsWithDataFilter(posts, 'tags', tags)
|
||||
}
|
||||
|
||||
const [filteredPosts, setFilteredPosts] = useState(getPosts())
|
||||
if (!filteredPosts) return null
|
||||
|
||||
function refreshPosts() {
|
||||
setFilteredPosts(getPosts())
|
||||
|
@ -15,7 +15,7 @@
|
||||
stroke: $text-color-light;
|
||||
margin-left: $spacer / 8;
|
||||
position: relative;
|
||||
top: 0;
|
||||
top: 0.1rem;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
|
Loading…
Reference in New Issue
Block a user