Skip to content

Commit

Permalink
Merge pull request #298 from celestiaorg/feature/gatsby-packages-update
Browse files Browse the repository at this point in the history
Gatsby v5 update, warnings fixed, packages-plugins updated, unnecessary packages removed.
  • Loading branch information
alex-beckett authored Nov 23, 2023
2 parents fbe6ffa + 934d7b4 commit 40fb0fc
Show file tree
Hide file tree
Showing 133 changed files with 6,951 additions and 49,499 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ name: CI
on:
# Triggers the workflow on push request events but only for the main branch
push:
branches: [ dev ]
branches: [dev]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Expand All @@ -26,25 +26,25 @@ jobs:

# Grab the required version of NodeJS
- name: Set Node.js
uses: actions/setup-node@v2.2.0
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: "18.17.0"

# Install all the Node dependencies for Gatsby, using your package.json file.
# Install all the Node dependencies for Gatsby, using your package.json file.
- name: Install Dependencies
run: npm i --save
run: npm install --legacy-peer-deps

# Speaks for itself no?
# Speaks for itself no?
- name: Build Gatsby Site
run: npm run build

# This was the hardest part for me to figure out - see article for more details
# This was the hardest part for me to figure out - see article for more details
- name: Install Deployment SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{secrets.deploy_key}}
known_hosts: ${{secrets.known_hosts}}

# Finally, deploy it to your very own server
# Finally, deploy it to your very own server
- name: Deploy To Live
run: rsync -avzh --delete -e 'ssh' public/* --rsync-path='mkdir -p ${{secrets.target_dir_dev}} && rsync' ${{secrets.ssh_user}}@${{secrets.ssh_host}}:${{secrets.target_dir_dev}}
20 changes: 10 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ name: CI
on:
# Triggers the workflow on push request events but only for the main branch
push:
branches: [ main ]
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Expand All @@ -26,25 +26,25 @@ jobs:

# Grab the required version of NodeJS
- name: Set Node.js
uses: actions/setup-node@v2.2.0
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: "18.17.0"

# Install all the Node dependencies for Gatsby, using your package.json file.
# Install all the Node dependencies for Gatsby, using your package.json file.
- name: Install Dependencies
run: npm i --save
run: npm install --legacy-peer-deps

# Speaks for itself no?
# Speaks for itself no?
- name: Build Gatsby Site
run: npm run build

# This was the hardest part for me to figure out - see article for more details
# This was the hardest part for me to figure out - see article for more details
- name: Install Deployment SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{secrets.deploy_key}}
known_hosts: ${{secrets.known_hosts}}

# Finally, deploy it to your very own server
# Finally, deploy it to your very own server
- name: Deploy To Live
run: rsync -avzh --delete -e 'ssh' public/* --rsync-path='mkdir -p ${{secrets.target_dir_main}} && rsync' ${{secrets.ssh_user}}@${{secrets.ssh_host}}:${{secrets.target_dir_main}}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ public/
node_modules/
.vscode/
.DS_Store
.env
.env
package-lock.json
278 changes: 139 additions & 139 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,141 +1,141 @@
module.exports = {
siteMetadata: {
title: `The first modular blockchain network`,
description: `Celestia is a modular consensus and data network, built to enable anyone to easily deploy their own blockchain with minimal overhead.`,
author: `@CelestiaOrg`,
siteUrl: `https://celestia.org`,
// siteUrl: `https://dev.lazyledger.org`, // <-- switch to this url for OG meta previews on https://dev.lazyledger.org
image: `/celestia-default-og-image.jpg`,
},
plugins: [
"gatsby-plugin-react-helmet",
"gatsby-plugin-sitemap",
"gatsby-plugin-gatsby-cloud",
"gatsby-plugin-image",
"gatsby-plugin-sass",
{
resolve: "gatsby-plugin-manifest",
options: {
icon: `./src/images/favicons/favicon-96x96.png`, // This path is relative to the root of the site.
theme_color: `#fff`,
icons: [
{
src: `/images/favicons/android-icon-192x192.png`,
sizes: `192x192`,
type: `image/png`,
},
],
},
},
{
resolve: "gatsby-plugin-anchor-links",
options: {
offset: -100
}
},
{
resolve: `gatsby-plugin-plausible`,
options: {
domain: `celestia.org`,
// https://github.com/pixelplicity/gatsby-plugin-plausible/issues/49#issuecomment-716125674
customDomain: `plausible.celestia.org/js/plausible.js?original=`,
},
},
"gatsby-plugin-mdx",
"gatsby-plugin-sharp",
{
resolve: `gatsby-transformer-sharp`,
options: {
// The option defaults to true
checkSupportedExtensions: false,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/images`,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "pages",
path: "./src/pages/",
},
__key: "pages",
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `markdown-pages`,
path: `${__dirname}/src/pages/markdown-pages`,
},
},
"gatsby-plugin-react-helmet",
'gatsby-plugin-sitemap',
{
resolve: 'gatsby-plugin-robots-txt',
options: {
host: "https://celestia.org",
// host: "https://dev.lazyledger.org",
sitemap: "https://celestia.org/sitemap.xml",
// sitemap: "https://dev.lazyledger.org/sitemap.xml",
output: "/robots.txt",
policy: [{ userAgent: '*', allow: '/' }]
}
},
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 700,
withWebp: true,
showCaptions: true,
quality: 100,
},
},
{
resolve: `gatsby-remark-image-attributes`,
options: {
// ?Boolean=false
// If true, all attributes that
// aren't styleAttributes, will be
// added as data-* attributes to the
// image.
dataAttributes: false
}
},
{
resolve: "gatsby-source-lever",
options: {
// Your Lever site instance name.
site: "celestia",
// Set verboseOutput to true to display a verbose output on `npm run develop` or `npm run build`
// It can help you debug specific API Endpoints problems
verboseOutput: true,
},
},
{
resolve: `gatsby-remark-autolink-headers`,
options: {
removeAccents: true,
isIconAfterHeader: true,
enableCustomId: true,
offsetY: `100`
},
}
],
},
},{
resolve: 'gatsby-plugin-mailchimp',
options: {
endpoint: 'https://celestia.us6.list-manage.com/subscribe/post?u=cde2461ba84f5279fff352829&amp;id=bb230bef69', // string; add your MC list endpoint here; see instructions below
timeout: 3500, // number; the amount of time, in milliseconds, that you want to allow mailchimp to respond to your request before timing out. defaults to 3500
},
},
],
siteMetadata: {
title: `The first modular blockchain network`,
description: `Celestia is a modular consensus and data network, built to enable anyone to easily deploy their own blockchain with minimal overhead.`,
author: `@CelestiaOrg`,
siteUrl: `https://celestia.org`,
// siteUrl: `https://dev.lazyledger.org`, // <-- switch to this url for OG meta previews on https://dev.lazyledger.org
image: `/celestia-default-og-image.jpg`,
},

plugins: [
"gatsby-plugin-react-helmet",
"gatsby-plugin-sitemap",
"gatsby-plugin-gatsby-cloud",
"gatsby-plugin-image",
"gatsby-plugin-sass",
{
resolve: "gatsby-plugin-manifest",
options: {
icon: `./src/images/favicons/favicon-96x96.png`, // This path is relative to the root of the site.
theme_color: `#fff`,
icons: [
{
src: `/images/favicons/android-icon-192x192.png`,
sizes: `192x192`,
type: `image/png`,
},
],
},
},
{
resolve: "gatsby-plugin-anchor-links",
options: {
offset: -100,
},
},
{
resolve: `gatsby-plugin-plausible`,
options: {
domain: `celestia.org`,
// https://github.com/pixelplicity/gatsby-plugin-plausible/issues/49#issuecomment-716125674
customDomain: `plausible.celestia.org/js/plausible.js?original=`,
},
},
"gatsby-plugin-mdx",
{
resolve: `gatsby-plugin-sharp`,
options: {
defaults: {
formats: [`auto`, `webp`],
quality: 100,
backgroundColor: `transparent`,
placeholder: `none`,
},
},
},
{
resolve: `gatsby-transformer-sharp`,
options: {
// The option defaults to true
checkSupportedExtensions: false,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/images`,
},
},
{
resolve: "gatsby-source-filesystem",
options: {
name: "pages",
path: "./src/pages/",
},
__key: "pages",
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `markdown-pages`,
path: `${__dirname}/src/pages/markdown-pages`,
},
},
"gatsby-plugin-react-helmet",
"gatsby-plugin-sitemap",
{
resolve: "gatsby-plugin-robots-txt",
options: {
host: "https://celestia.org",
// host: "https://dev.lazyledger.org",
sitemap: "https://celestia.org/sitemap.xml",
// sitemap: "https://dev.lazyledger.org/sitemap.xml",
output: "/robots.txt",
policy: [{ userAgent: "*", allow: "/" }],
},
},
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 700,
withWebp: true,
showCaptions: true,
quality: 100,
},
},
{
resolve: "gatsby-source-lever",
options: {
// Your Lever site instance name.
site: "celestia",
// Set verboseOutput to true to display a verbose output on `npm run develop` or `npm run build`
// It can help you debug specific API Endpoints problems
verboseOutput: true,
},
},
{
resolve: `gatsby-remark-autolink-headers`,
options: {
removeAccents: true,
isIconAfterHeader: true,
enableCustomId: true,
offsetY: `100`,
},
},
],
},
},
{
resolve: "gatsby-plugin-mailchimp",
options: {
endpoint: "https://celestia.us6.list-manage.com/subscribe/post?u=cde2461ba84f5279fff352829&amp;id=bb230bef69", // string; add your MC list endpoint here; see instructions below
timeout: 3500, // number; the amount of time, in milliseconds, that you want to allow mailchimp to respond to your request before timing out. defaults to 3500
},
},
],
};
Loading

0 comments on commit 40fb0fc

Please sign in to comment.