docs: update showcase images; remove GraphQL Code Generator site (#6231)
* Showcase: Update images
* Showcase: Remove sites that are not working, and have not been working since yesterday.
* Suspected no longer using docusaurus (please confirm)
* Revert "Showcase: Remove sites that are not working, and have not been working since yesterday."
This reverts commit c963f120e9
.
* add notices
* test screen resolution
* all of them
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
|
@ -9,6 +9,8 @@
|
|||
import sharp from 'sharp';
|
||||
import fs from 'fs/promises';
|
||||
import path from 'path';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import imageSize from 'image-size';
|
||||
|
||||
const allImages = (
|
||||
await fs.readdir(new URL('../../website/src/data/showcase', import.meta.url))
|
||||
|
@ -23,6 +25,12 @@ await Promise.all(
|
|||
`../../website/src/data/showcase/${img}`,
|
||||
import.meta.url,
|
||||
).pathname;
|
||||
const {width, height} = imageSize(imgPath);
|
||||
if (width === 640 && height === 320) {
|
||||
// Do not emit if no resized. Important because we
|
||||
// can't guarantee idempotency during resize -> optimization
|
||||
return;
|
||||
}
|
||||
const data = await sharp(imgPath)
|
||||
.resize(640, 320, {fit: 'cover', position: 'top'})
|
||||
.png()
|
||||
|
|
|
@ -100,6 +100,7 @@
|
|||
"eslint-plugin-react-hooks": "^4.3.0",
|
||||
"glob": "^7.1.6",
|
||||
"husky": "^5.0.9",
|
||||
"image-size": "^1.0.0",
|
||||
"is-ci": "^3.0.0",
|
||||
"jest": "^26.6.3",
|
||||
"lerna": "^3.22.1",
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
"@types/jest": "^26.0.20",
|
||||
"cross-env": "^7.0.3",
|
||||
"fs-extra": "^10.0.0",
|
||||
"image-size": "^1.0.0",
|
||||
"raw-loader": "^4.0.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import {Joi} from '@docusaurus/utils-validation';
|
|||
|
||||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import imageSize from 'image-size';
|
||||
|
||||
declare global {
|
||||
|
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 33 KiB |
|
@ -181,6 +181,7 @@ const Users: User[] = [
|
|||
source: 'https://github.com/algolia/docsearch-website',
|
||||
tags: ['favorite', 'opensource', 'product'],
|
||||
},
|
||||
// TODO site unavailable on 12/31/2021
|
||||
{
|
||||
title: 'Amphora Data',
|
||||
description: 'Connecting the world’s real-time information',
|
||||
|
@ -233,6 +234,7 @@ const Users: User[] = [
|
|||
source: 'https://gitlab.com/aweframework/awe',
|
||||
tags: ['opensource', 'i18n', 'versioning'],
|
||||
},
|
||||
// TODO site unavailable on 12/31/2021
|
||||
{
|
||||
title: 'Axioms',
|
||||
description: 'Axioms Developer Hub and Documentation Portal',
|
||||
|
@ -633,15 +635,6 @@ const Users: User[] = [
|
|||
source: 'https://github.com/gotenberg/gotenberg.dev',
|
||||
tags: ['opensource', 'versioning'],
|
||||
},
|
||||
{
|
||||
title: 'GraphQL Code Generator',
|
||||
description:
|
||||
'Generate code from your GraphQL schema and operations with a simple CLI',
|
||||
preview: require('./showcase/graphql-codegen.png'),
|
||||
website: 'https://graphql-code-generator.com/',
|
||||
source: 'https://github.com/dotansimha/graphql-code-generator',
|
||||
tags: ['favorite', 'opensource', 'design'],
|
||||
},
|
||||
{
|
||||
title: 'GraphQL Inspector',
|
||||
description: 'An open-source tool to help you work with GraphQL',
|
||||
|
@ -1470,7 +1463,7 @@ const Users: User[] = [
|
|||
title: 'Supabase',
|
||||
description: 'Open Source Realtime and RESTful APIs for Postgres',
|
||||
preview: require('./showcase/supabase.png'),
|
||||
website: 'https://www.supabase.io/',
|
||||
website: 'https://www.supabase.io/docs',
|
||||
source: 'https://github.com/supabase/monorepo',
|
||||
tags: ['opensource', 'favorite', 'design', 'large', 'product'],
|
||||
},
|
||||
|
@ -1626,6 +1619,7 @@ const Users: User[] = [
|
|||
source: 'https://github.com/webiny/docs.webiny.com',
|
||||
tags: ['opensource', 'product'],
|
||||
},
|
||||
// TODO site unavailable on 12/31/2021
|
||||
{
|
||||
title: 'Wisdom',
|
||||
description: 'Session replay web analytics with open data SQL/S3 access.',
|
||||
|
|