Skip to content

Commit

Permalink
feat: docusaurus faster (#963)
Browse files Browse the repository at this point in the history
* feat: docusaurus faster

* feat: see cloudinary

* fix: revert cloudinary

* feat: bluesky
  • Loading branch information
johnnyreilly authored Nov 11, 2024
1 parent 72db38a commit 0d53762
Show file tree
Hide file tree
Showing 6 changed files with 2,821 additions and 1,628 deletions.
4 changes: 0 additions & 4 deletions blog-website/babel.config.js

This file was deleted.

36 changes: 12 additions & 24 deletions blog-website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const IS_LIVE_SITE = process.env['IS_LIVE_SITE'] === 'true';
console.log('IS_LIVE_SITE', IS_LIVE_SITE);

import { readFileSync } from 'fs';
import fontaine from 'fontaine';
import * as fontaine from 'fontaine';
import { themes as prismThemes } from 'prism-react-renderer';
import imageFetchPriorityRehypePlugin from './image-fetchpriority-rehype-plugin.mjs';
import docusaurusCloudinaryRehypePlugin from 'rehype-cloudinary-docusaurus';
Expand All @@ -29,6 +29,7 @@ const sameAs = [
'https://github.com/johnnyreilly',
'https://fosstodon.org/@johnny_reilly',
'https://twitter.com/johnny_reilly',
'https://bsky.app/profile/johnnyreilly.bsky.social',
'https://dev.to/johnnyreilly',
'https://app.daily.dev/johnnyreilly',
'https://stackoverflow.com/users/761388/john-reilly',
Expand Down Expand Up @@ -270,6 +271,10 @@ const config = {
organizationName: 'johnnyreilly', // Usually your GitHub org/user name.
projectName: 'blog.johnnyreilly.com', // Usually your repo name.

future: {
experimental_faster: true,
},

markdown: {
// based on https://github.com/facebook/docusaurus/blob/main/website/docs/migration/v3.mdx
mdx1Compat: {
Expand All @@ -284,29 +289,6 @@ const config = {
locales: ['en'],
},

webpack: {
jsLoader: (isServer) => ({
loader: require.resolve('swc-loader'),
options: {
jsc: {
parser: {
syntax: 'typescript',
tsx: true,
},
transform: {
react: {
runtime: 'automatic',
},
},
target: 'es2017',
},
module: {
type: isServer ? 'commonjs' : 'es6',
},
},
}),
},

presets: [
[
'classic',
Expand Down Expand Up @@ -579,6 +561,12 @@ const config = {
rel: 'me',
position: 'right',
},
{
href: 'https://bsky.app/profile/johnnyreilly.bsky.social',
label: 'Bluesky',
rel: 'me',
position: 'right',
},
// <a rel="me" href="https://fosstodon.org/@johnny_reilly">Mastodon</a>
{
href: 'https://fosstodon.org/@johnny_reilly',
Expand Down
Loading

0 comments on commit 0d53762

Please sign in to comment.