Skip to content

Commit 81d6170

Browse files
Copilothamza-mohd
andauthored
Merge branch 'master' into docs/kanvas-autopan-render-modes
Resolve add/add conflict in content/en/kanvas/advanced/render-modes/index.md by merging detailed technical content from both branches: - Keep PR's detailed render mode descriptions, feature size gate table, adaptive render mode deep-dive, cheat sheet, and related pages - Incorporate master's badge/SVG specifics, Switching Render Modes section, Performance Guidance, Best Practices, Known Limitations, and Designer vs Operator sections Signed-off-by: GitHub <noreply@github.com> Co-authored-by: hamza-mohd <135669921+hamza-mohd@users.noreply.github.com>
2 parents 1055a8e + 2b6bac9 commit 81d6170

File tree

89 files changed

+136575
-832
lines changed

Some content is hidden

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

89 files changed

+136575
-832
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Build and Preview Docs
2+
3+
on:
4+
pull_request_target:
5+
branches: [master]
6+
types: [opened, synchronize, reopened, closed]
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
concurrency:
13+
group: preview-${{ github.event.pull_request.number || github.run_id }}
14+
cancel-in-progress: true
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
20+
jobs:
21+
build-and-deploy-preview:
22+
runs-on: ubuntu-24.04
23+
env:
24+
HUGO_VERSION: 0.158.0
25+
26+
steps:
27+
- name: Checkout PR code
28+
if: github.event.action != 'closed'
29+
uses: actions/checkout@v6
30+
with:
31+
repository: ${{ github.event.pull_request.head.repo.full_name }}
32+
ref: ${{ github.event.pull_request.head.sha }}
33+
persist-credentials: false
34+
submodules: recursive
35+
fetch-depth: 0
36+
37+
- name: Checkout for cleanup
38+
if: github.event.action == 'closed'
39+
uses: actions/checkout@v6
40+
with:
41+
ref: gh-pages
42+
fetch-depth: 0
43+
44+
- name: Install Hugo CLI
45+
if: github.event.action != 'closed'
46+
run: |
47+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
48+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
49+
50+
- name: Install Dart Sass
51+
if: github.event.action != 'closed'
52+
run: sudo snap install dart-sass
53+
54+
- name: Setup Node
55+
if: github.event.action != 'closed'
56+
uses: actions/setup-node@v4
57+
with:
58+
node-version: "20"
59+
60+
- name: Install dependencies
61+
if: github.event.action != 'closed'
62+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
63+
64+
- name: Build PR preview
65+
if: github.event.action != 'closed'
66+
env:
67+
HUGO_ENVIRONMENT: production
68+
HUGO_ENV: production
69+
HUGO_PREVIEW: "true"
70+
run: |
71+
hugo \
72+
--gc \
73+
--minify \
74+
--baseURL "/"
75+
cat > public/robots.txt <<'EOF'
76+
User-agent: *
77+
Disallow: /
78+
EOF
79+
80+
- name: Deploy PR preview
81+
if: github.event.action != 'closed'
82+
uses: rossjrw/pr-preview-action@v1.6.3
83+
with:
84+
source-dir: ./public
85+
preview-branch: gh-pages
86+
umbrella-dir: pr-preview
87+
action: auto
88+
comment: false
89+
90+
- name: Comment PR with Preview URL
91+
if: github.event.action != 'closed'
92+
uses: marocchino/sticky-pull-request-comment@v2
93+
with:
94+
header: pr-preview
95+
message: |
96+
🚀 Preview deployment: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr-preview/pr-${{ github.event.pull_request.number }}/
97+
98+
- name: Cleanup PR preview on close
99+
if: github.event.action == 'closed'
100+
uses: rossjrw/pr-preview-action@v1.6.3
101+
with:
102+
preview-branch: gh-pages
103+
umbrella-dir: pr-preview
104+
action: remove

.github/workflows/hugo.yaml

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,23 @@ on:
1212
# Allows you to run this workflow manually from the Actions tab
1313
workflow_dispatch:
1414

15-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1615
permissions:
17-
contents: read
18-
pages: write
19-
id-token: write
16+
contents: write
2017

2118
concurrency:
22-
group: "pages-deployment"
23-
cancel-in-progress: true # Only latest deployment runs
19+
group: pages-deployment
20+
cancel-in-progress: true
2421

2522
# Default to bash
2623
defaults:
2724
run:
2825
shell: bash
2926

3027
jobs:
31-
# Build job
32-
build:
28+
deploy:
3329
runs-on: ubuntu-24.04
3430
env:
35-
HUGO_VERSION: 0.157.0
31+
HUGO_VERSION: 0.158.0
3632
steps:
3733
- name: Install Hugo CLI
3834
run: |
@@ -45,34 +41,27 @@ jobs:
4541
with:
4642
submodules: recursive
4743
fetch-depth: 0
48-
- name: Setup Pages
49-
id: pages
50-
uses: actions/configure-pages@v5
44+
- name: Setup Node
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: "20"
5148
- name: Install Node.js dependencies
5249
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
5350
- name: Build with Hugo
5451
env:
55-
# For maximum backward compatibility with Hugo modules
5652
HUGO_ENVIRONMENT: production
5753
HUGO_ENV: production
5854
run: |
5955
hugo \
6056
--gc \
6157
--minify \
62-
--baseURL "${{ steps.pages.outputs.base_url }}/"
63-
- name: Upload artifact
64-
uses: actions/upload-pages-artifact@v3
65-
with:
66-
path: ./public
67-
68-
# Deployment job
69-
deploy:
70-
environment:
71-
name: github-pages
72-
url: ${{ steps.deployment.outputs.page_url }}
73-
runs-on: ubuntu-24.04
74-
needs: build
75-
steps:
58+
--baseURL "/"
59+
cp CNAME public/CNAME
60+
touch public/.nojekyll
7661
- name: Deploy to GitHub Pages
77-
id: deployment
78-
uses: actions/deploy-pages@v4
62+
uses: peaceiris/actions-gh-pages@v4
63+
with:
64+
github_token: ${{ secrets.GITHUB_TOKEN }}
65+
publish_dir: ./public
66+
publish_branch: gh-pages
67+
keep_files: true

CONTRIBUTING.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# <a name="contributing">Contributing Overview</a>
22
Please do! Thanks for your help improving the project! :balloon:
33

4+
## --> See https://docs.layer5.io/contributing <--
5+
46
All contributors are welcome. Please see the [newcomers welcome guide](https://layer5.io/community/newcomers) for how, where and why to contribute. This project is community-built and welcomes collaboration. Contributors are expected to adhere to our [Code of Conduct](CODE_OF_CONDUCT.md).
57

68
Not sure where to start? First, see the [newcomers welcome guide](https://layer5.io/community/newcomers). Grab an open issue with the [help-wanted label](../../labels/help%20wanted) and jump in. Join the [Slack account](http://slack.layer5.io) and engage in conversation. Create a [new issue](/../../issues/new/choose) if needed. All [pull requests](/../../pulls) should reference an open [issue](/../../issues). Include keywords in your pull request descriptions, as well as commit messages, to [automatically close issues in GitHub](https://help.github.com/en/github/managing-your-work-on-github/closing-issues-using-keywords).
79

810
**Sections**
9-
- <a name="contributing">General Contribution Flow</a>
10-
- <a href="#prerequisites">Prerequisites</a>
11-
- <a href="#set-up-your-local-development-environment">Set up your Local Development Environment</a>
12-
- <a href="#commit-signing">Developer Certificate of Origin</a>
11+
<a name="contributing">General Contribution Flow</a>
12+
- <a href="#prerequisites">Prerequisites</a>
13+
- <a href="#set-up-your-local-development-environment">Set up your Local Development Environment</a>
14+
- <a href="#commit-signing">Developer Certificate of Origin</a>
1315

1416
Relevant coding style guidelines are the Go Code Review Comments and the Formatting and style section of Peter Bourgon's Go: Best Practices for Production Environments.
1517

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ setup:
2222
## Run docs.layer5.io on your local machine with draft and future content enabled.
2323
site: check-go
2424
hugo server -D -F
25-
26-
## Run docs.layer5.io on your local machine. Alternate method.
27-
site-fast:
28-
gatsby develop
2925

3026
## Build docs.layer5.io on your local machine.
3127
build:
@@ -36,7 +32,7 @@ clean:
3632
hugo --cleanDestinationDir
3733
make site
3834

39-
.PHONY: setup build site clean site-fast check-go docker
35+
.PHONY: setup build site clean check-go docker
4036

4137
check-go:
4238
@echo "Checking if Go is installed..."

0 commit comments

Comments
 (0)