Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e9e5eba
add initial blog post draft
slorber Jul 21, 2022
e48b693
add initial blog post draft
slorber Jul 21, 2022
97c323e
blog post progress
slorber Jul 22, 2022
dc48851
blog post progress
slorber Jul 22, 2022
0079e49
blog post progress
slorber Jul 22, 2022
bae7828
blog post progress
slorber Jul 22, 2022
d551dbf
add initial quote design
slorber Jul 22, 2022
39e96a6
update screenshots
slorber Jul 22, 2022
0a1ca9d
add quote
slorber Jul 22, 2022
e5fe53a
Merge branch 'main' into slorber/blog-post
slorber Jul 25, 2022
69a507f
update joel title
slorber Jul 25, 2022
ffde7ac
showcase link
slorber Jul 25, 2022
c500170
change quotes
slorber Jul 25, 2022
31cce7e
handle Josh review
slorber Jul 25, 2022
5a17520
add more quotes
slorber Jul 25, 2022
f1c5bc0
add producthunt card integration + homepage top banner
slorber Jul 26, 2022
16c86df
rename to mdx
slorber Jul 26, 2022
0e78b4d
blog quotes
slorber Jul 26, 2022
ed7466c
minor tweaks
slorber Jul 26, 2022
2cb2d83
larger landing page text
slorber Jul 26, 2022
604df48
proper npm downloads screenshot
slorber Jul 26, 2022
0a65fdc
proper star-history screenshot
slorber Jul 26, 2022
7694248
typo
slorber Jul 26, 2022
aeea50d
change trends org
slorber Jul 26, 2022
9e5b577
Add showcase carousels
slorber Jul 26, 2022
db0a59e
Hamel quote + minor quote tweaks
slorber Jul 26, 2022
3e3eaec
better v1 carousel
slorber Jul 26, 2022
68694b1
better v1 carousel
slorber Jul 26, 2022
bfab46b
update Paul Armstrong quote
slorber Jul 26, 2022
f76226c
add jody's quote
slorber Jul 26, 2022
8f90b3f
change blog post structure a bit
slorber Jul 26, 2022
8fa09b8
add quotes + design tweaks
slorber Jul 26, 2022
2f97ec3
blog post
slorber Jul 26, 2022
5bce78f
bold
slorber Jul 26, 2022
4627033
fix
slorber Jul 26, 2022
3e1e0e9
add proper v2 site showcase
slorber Jul 27, 2022
f9b5e46
minor tweaks
slorber Jul 27, 2022
9ad7a84
proper plugins section
slorber Jul 27, 2022
ffcf0d4
blog post
slorber Jul 27, 2022
70a99d3
add youtube demo to blog post
slorber Jul 27, 2022
fea9d38
minor edit
slorber Jul 27, 2022
ec6c389
update authors map: facebook = meta
slorber Jul 27, 2022
f9dccb0
add HN icon
slorber Jul 28, 2022
783937e
consistent casing for Meta Open Source
slorber Jul 28, 2022
a2b4f59
typo
slorber Jul 28, 2022
471e4b1
typo
slorber Jul 28, 2022
bb369cb
fix tag + admonition producthunt+HN layout
slorber Jul 28, 2022
a54e74f
update social card
slorber Jul 28, 2022
5a44069
Add slash plushie picture
slorber Jul 28, 2022
3b49f88
make quotes more visible
slorber Jul 29, 2022
541878b
add link to what's new
slorber Jul 29, 2022
5669a5d
remove tweetquote avatar lazyness
slorber Jul 29, 2022
5ca99aa
add new image resize script
slorber Jul 29, 2022
7564401
increase resize quality
slorber Jul 29, 2022
8bb99f8
resize blog images
slorber Jul 29, 2022
c32d7d5
optimise images
slorber Jul 29, 2022
7444301
Merge branch 'main' into slorber/blog-post
slorber Jul 31, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

node_modules
.yarn
package-lock.json

.eslintcache

Expand Down
53 changes: 53 additions & 0 deletions admin/scripts/resizeImageBlog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

import fs from 'fs-extra';
import path from 'path';
import logger from '@docusaurus/logger';
import sharp from 'sharp';
import imageSize from 'image-size';
import globby from 'globby';

// TODO duplicate temporary script: factorize!

const imgDir = 'website/blog/2022-08-01-announcing-docusaurus-2.0/img';

const imgWidth = 1200;

const allImages = (await globby(`${imgDir}/**`)).filter((file) =>
['.png', 'jpg', '.jpeg'].includes(path.extname(file)),
);

const [, , ...selectedImages] = process.argv;
const images = selectedImages.length > 0 ? selectedImages : allImages;

const stats = {
skipped: 0,
resized: 0,
};

await Promise.all(
images.map(async (imgPath) => {
const {width, height} = imageSize(imgPath);
if (width === imgWidth && imgPath.endsWith('.png')) {
// Do not emit if not resized. Important because we can't guarantee
// idempotency during resize -> optimization
stats.skipped += 1;
return;
}
logger.info`Resized path=${imgPath}: Before number=${width}×number=${height}`;
const data = await sharp(imgPath)
.resize(imgWidth)
.png({quality: 100})
.toBuffer();
await fs.writeFile(imgPath.replace(/jpe?g/, 'png'), data);
stats.resized += 1;
}),
);

console.log(`Blog images resizing complete.
${JSON.stringify(stats, null, 2)}`);
27 changes: 27 additions & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ npmrc
nprogress
ntfs
nuxt
O’Shannessy
onboarded
openapi
opensearch
Expand Down Expand Up @@ -250,6 +251,7 @@ quasis
quddus
quddús
quotify
rachelnabors
ramón
reactjs
rearchitecture
Expand Down Expand Up @@ -364,3 +366,28 @@ yangshun
yangshunz
zhou
zoomable
zpao
paularmstrong
devs
Viet
dabit
Dabit
alexbdebrie
Investec
Quickwit
Hamel
Husain
Outerbounds
jodyheavener
Heavener
maxlynch
gabrielcsapo
Csapo
Hasura
Solana
solana
shiki
twoslash
Shiki
Therox
plushies
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

.carousel {
position: relative;
}

.navButton {
position: absolute;
top: 50%;
transform: translateY(-50%);
border: 0;
border-radius: 50%;
color: #fff;
font-size: 20px;
height: 40px;
width: 40px;

background-color: rgb(0 0 0 / 30%);
transition: all var(--ifm-transition-fast)
var(--ifm-transition-timing-default);
}

.navButton:hover {
background-color: rgb(0 0 0 / 45%);
}

.dotGroup {
position: absolute;
bottom: 5px;
width: 100%;
display: flex;
justify-content: center;
pointer-events: none;
}

.dotGroup > :global(.carousel__dot) {
pointer-events: auto;
display: inline-block;
border: none;
height: 1rem;
width: 1rem;
border-radius: 50%;
margin: 2px;
background: rgb(0 0 0 / 20%);
}

.dotGroup > :global(.carousel__dot--selected) {
background: rgb(0 0 0 / 45%);
}

.siteSlide {
position: relative;
}

.siteLink {
position: absolute;
bottom: 2px;
right: 2px;
padding: 0 12px;
background-color: rgb(0 0 0 / 30%);
border-radius: 6px;
font-size: 16px;
--ifm-link-color: var(--ifm-color-gray-400);
transition: all var(--ifm-transition-fast)
var(--ifm-transition-timing-default);
}

.siteLink:hover {
background-color: rgb(0 0 0 / 45%);
--ifm-link-color: var(--ifm-color-gray-200);
--ifm-link-hover-color: var(--ifm-color-gray-200);
--ifm-link-hover-decoration: none;
}

@media only screen and (max-width: 768px) {
.siteLink {
font-size: 12px;
padding: 0 8px;
}
}
Loading