Skip to content

Commit 4976317

Browse files
authored
Merge branch 'master' into fix/learn-page-card-layout
2 parents 0491a67 + 522f2ae commit 4976317

36 files changed

Lines changed: 833 additions & 560 deletions

File tree

‎.github/workflows/build-site-preview.yaml‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,27 @@ defaults:
1919
jobs:
2020
build:
2121
runs-on: ubuntu-24.04
22-
if: github.event.action != 'closed'
23-
2422
steps:
2523
- name: Harden Runner
2624
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
2725
with:
2826
egress-policy: audit
2927

3028
- name: Checkout PR
29+
if: github.event.action != 'closed'
3130
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3231
with:
3332
persist-credentials: false
3433

3534
- name: Setup Node
35+
if: github.event.action != 'closed'
3636
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
3737
with:
3838
node-version: "22"
3939
cache: 'npm'
4040

4141
- name: Gatsby Cache
42+
if: github.event.action != 'closed'
4243
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
4344
with:
4445
path: |
@@ -48,9 +49,15 @@ jobs:
4849
${{ runner.os }}-gatsby-${{ github.event.pull_request.number }}-
4950
5051
- name: Install dependencies
52+
if: github.event.action != 'closed'
5153
run: npm ci
5254

55+
- name: Unit tests
56+
if: github.event.action != 'closed'
57+
run: npm run test:unit
58+
5359
- name: Build PR preview
60+
if: github.event.action != 'closed'
5461
env:
5562
GATSBY_PREVIEW: "true"
5663
GATSBY_SITE_URL: https://${{ github.repository_owner }}.github.io

‎.github/workflows/checks.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121
- name: Check CONTRIBUTING versions
2222
run: npm run check:contributing-versions
2323

24+
- name: Unit tests
25+
run: npm run test:unit
26+
2427
- name: Build
2528
run: npm run build
2629

‎.github/workflows/copilot-pr-handler.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ jobs:
5151
handle-copilot-pr:
5252
name: Handle Copilot PR
5353
runs-on: ubuntu-24.04
54-
# Only run for the meshery/meshery repository
54+
# Only run for the layer5io/layer5 repository
5555
# Only run for PRs from the Copilot SWE agent (copilot[bot])
5656
if: |
57-
github.repository == 'meshery/meshery' &&
57+
github.repository == 'layer5io/layer5' &&
5858
(
5959
github.event_name == 'workflow_dispatch' ||
6060
github.event.pull_request.user.login == 'copilot[bot]'

‎.github/workflows/copilot-pr-handler.yml‎‎

Lines changed: 0 additions & 245 deletions
This file was deleted.

‎.github/workflows/deploy-site-preview.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
actions: read
1212

1313
concurrency:
14-
group: preview-post-build-${{ github.event.workflow_run.head_branch }}
14+
group: preview-post-build-${{ github.event.workflow_run.head_repository.full_name }}-${{ github.event.workflow_run.head_branch }}
1515
cancel-in-progress: false
1616

1717
env:
@@ -118,7 +118,7 @@ jobs:
118118
# emitted a usable close event.
119119
needs: manage-preview
120120
runs-on: ubuntu-24.04
121-
if: needs.manage-preview.outputs.action != 'closed'
121+
if: ${{ !cancelled() && needs.manage-preview.outputs.action != 'closed' }}
122122
outputs:
123123
removed_prs: ${{ steps.prune-previews.outputs.removed_prs }}
124124
removed_prs_json: ${{ steps.prune-previews.outputs.removed_prs_json }}

‎CONTRIBUTING.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ If you'd like to contribute a post to layer5.io/blog, please open an Issue and s
127127

128128
# Contributing to Layer5 Sistent
129129

130-
If you'd like to contribute to [Sistent](https://github.com/layer5io/sistent), a UI/UX design system, start by selecting the [project/sistent](https://github.com/layer5io/layer5/labels/project%2Fsistent)label in this repo at https://github.com/layer5io/layer5/labels/project%2Fsistent or by visiting the project repo at hhttps://github.com/layer5io/sistent.
130+
If you'd like to contribute to [Sistent](https://github.com/layer5io/sistent), a UI/UX design system, start by selecting the [project/sistent](https://github.com/layer5io/layer5/labels/project%2Fsistent) label in this repo at https://github.com/layer5io/layer5/labels/project%2Fsistent or by visiting the project repo at https://github.com/layer5io/sistent.
131131

132132
### General Contribution Guidelines
133133

@@ -527,8 +527,9 @@ Environment variables are named values used to configure how an application beha
527527
| Variable | Possible Values | Description |
528528
| --------------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
529529
| `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. |
530-
| `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. |
530+
| `LITE_BUILD_PROFILE` | `core`, `content`, `blog` | Selects which collections are excluded when `BUILD_FULL_SITE=false`. `core` is the default for `make site`, `npm start`, and `npm run dev` and skips blog, news, events, and resources. `content` keeps blog, news, events, and resources enabled. `blog` keeps the blog and skips news, events, and resources; `make site-blog` uses it. |
531531
| `BUILD_COLLECTIONS_EXCLUDE` | comma-separated collection names | Adds extra collections to exclude from a lightweight build without editing project files. |
532+
| `BLOG_YEAR` | comma-separated four-digit years | Limits a lightweight build that includes the blog (`content` or `blog` profile) to posts under `src/collections/blog/<year>`, e.g. `BLOG_YEAR=2026` or `BLOG_YEAR=2025,2026`. Posts from other years are not built and return 404. `make site-blog` defaults it to the latest year. A year with no directory, or a value that is not a year, fails the build. Ignored, with a warning, for full builds and for profiles that exclude the blog. |
532533
| `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. |
533534
| `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. |
534535

@@ -588,7 +589,7 @@ make setup
588589
make site
589590
```
590591

591-
This will run a local webserver with "live reload" conveniently enabled.
592+
This will run a local webserver with "live reload" conveniently enabled. `make site` skips the blog, news, events, and resources collections to keep builds fast. To work on a blog post, run `make site-blog`, which builds only the latest year's blog posts; choose other years with `BLOG_YEAR=2025,2026 make site-blog`. Run `make` to list every target.
592593

593594
`make site` starts a **lightweight** dev server: it skips the heaviest content
594595
collections (members, integrations, blog, news, events, resources) so that the

‎Makefile‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@ site:
2525
@echo " Use LITE_BUILD_PROFILE=content make site to include content collections while still skipping the heaviest routes."
2626
@npx cross-env BUILD_FULL_SITE=false LITE_BUILD_PROFILE=$(or $(LITE_BUILD_PROFILE),core) BLOG_YEAR=$(or $(BLOG_YEAR),) env-cmd -f .env.development node scripts/run-gatsby.js develop
2727

28-
## Run blog-only dev server (2026 posts only, much faster builds).
28+
# Latest year directory under src/collections/blog, e.g. 2026.
29+
LATEST_BLOG_YEAR := $(shell ls src/collections/blog | grep -E '^[0-9]{4}$$' | sort | tail -n 1)
30+
31+
## Run blog-only dev server scoped to the latest blog year (override: BLOG_YEAR=2025,2026).
2932
site-blog:
30-
@echo "🏗️ Building lightweight site version with blog collection only..."
31-
LITE_BUILD_PROFILE=blog BLOG_YEAR=2026 $(MAKE) site
33+
@echo "🏗️ Building lightweight site version with blog posts from $(or $(BLOG_YEAR),$(LATEST_BLOG_YEAR)) only..."
34+
LITE_BUILD_PROFILE=blog BLOG_YEAR=$(or $(BLOG_YEAR),$(LATEST_BLOG_YEAR)) $(MAKE) site
3235

3336
# "make site-full" forces the dev server to include every collection.
3437
## Run a full build of layer5.io on your local machine.

0 commit comments

Comments
 (0)