Skip to content

Commit 447c1fb

Browse files
authored
Merge branch 'master' into fcp-webpack-analyzer
2 parents 1c75ee7 + d12f679 commit 447c1fb

File tree

73 files changed

+1952
-1343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1952
-1343
lines changed

.github/workflows/build-and-preview-site.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: bash ./script.sh
2929

3030
- name: Upload files
31-
uses: actions/upload-artifact@master
31+
uses: actions/upload-artifact@v6
3232
with:
3333
name: public-dir
3434
path: ./public-dir.zip

.github/workflows/preview-site.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ on:
99
jobs:
1010
deploy-preview:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
actions: read
14+
contents: read
1215
steps:
1316
- name: Checkout code
1417
uses: actions/checkout@v6
1518

1619
- name: Download Site dir
17-
uses: dawidd6/action-download-artifact@v11
20+
uses: actions/download-artifact@v7
1821
with:
19-
github_token: ${{ secrets.GH_ACCESS_TOKEN }}
20-
workflow: build-and-preview-site.yml
21-
run_id: ${{ github.event.workflow_run.id }}
22+
github-token: ${{ github.token }}
23+
run-id: ${{ github.event.workflow_run.id }}
2224
name: public-dir
2325

2426
- name: Unzip Site
@@ -44,5 +46,3 @@ jobs:
4446
with:
4547
token: ${{ secrets.GH_ACCESS_TOKEN }}
4648
deploy_url: "${{ steps.netlify.outputs.deploy-url }}"
47-
48-

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,8 @@ Environment variables are named values used to configure how an application beha
519519
| Variable | Possible Values | Description |
520520
|---------|----------------|------------|
521521
| `BUILD_FULL_SITE` | `true`, `false` | When set to `true`, enables a full site build including all collections. If not explicitly set to `true`, the project defaults to a lightweight build. |
522+
| `LITE_BUILD_PROFILE` | `content`, `core` | Selects which collections are excluded when `BUILD_FULL_SITE=false`. `core` is the default for `make site`, `npm start`, and `npm run dev`, while `content` keeps blog, news, events, and resources enabled. |
523+
| `BUILD_COLLECTIONS_EXCLUDE` | comma-separated collection names | Adds extra collections to exclude from a lightweight build without editing project files. |
522524
| `NODE_ENV` | `development`, `production` | Determines the build and rendering mode used by Gatsby. This is automatically set by Gatsby. <br><br>• `development` - Uses **Deferred Static Generation (DSG)** i.e pages built on demand for faster startup. <br>• `production` - Uses **Server-Side Rendering (SSR)** i.e pages rendered on each request for fresh content. |
523525
| `CI` | `true`, `false` | Indicates that the build is running in a **Continuous Integration (CI)** environment (e.g., GitHub Actions). When set to `true`, special logic is applied to page paths and redirects for GitHub Pages compatibility. This is typically set automatically by the CI system and does not need to be configured manually. |
524526

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ setup:
2121
# "make site" - The default lightweight build keeps the dev server fast by skipping heavy collections.
2222
## Run a partial build of layer5.io on your local machine.
2323
site:
24-
@echo "🏗️ Building lightweight site version (excluding Members and Integrations collections)..."
24+
@echo "🏗️ Building lightweight site version (core profile excludes Members, Integrations, Blog, News, Events, and Resources collections)..."
25+
@echo " Use LITE_BUILD_PROFILE=content make site to include content collections while still skipping the heaviest routes."
2526
@npm run develop:lite
2627

2728
# "make site-full" forces the dev server to include every collection.
@@ -32,7 +33,7 @@ site-full:
3233

3334
## Run layer5.io on your local machine. Alternate method.
3435
site-fast:
35-
NODE_OPTIONS=--max-old-space-size=8192 gatsby develop
36+
BUILD_FULL_SITE=false LITE_BUILD_PROFILE=core GATSBY_CPU_COUNT=4 SHARP_CONCURRENCY=4 UV_THREADPOOL_SIZE=4 NODE_OPTIONS=--max-old-space-size=8192 gatsby develop
3637

3738
## Build layer5.io on your local machine.
3839
build:

gatsby-browser.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import "./fonts.css";
22
import "slick-carousel/slick/slick.css";
33
import "slick-carousel/slick/slick-theme.css";
44

5+
export const disableCorePrefetching = () =>
6+
process.env.NODE_ENV === "development";
7+
58
document.addEventListener("DOMContentLoaded", () => {
69
/** init gtm after 3500 seconds - this could be adjusted */
710
setTimeout(initGTM, 3500);

0 commit comments

Comments
 (0)