Skip to content

feat: update templates to static-site recipe v1.0.0 - #41

Merged
raymondk merged 2 commits into
mainfrom
fm/templates-static-site-v1-m3
Nov 19, 2026
Merged

raymondk merged 2 commits into
mainfrom
fm/templates-static-site-v1-m3

Conversation

@raymondk

Copy link
Copy Markdown
Contributor

Intent

There was a new release of the static site recipe, 1.0.0, in the repo dfinity/icp-cli-recipes (release static-site-v1.0.0: https://github.com/dfinity/icp-cli-recipes/releases/tag/static-site-v1.0.0). Open a PR against dfinity/icp-cli-templates to update all the templates to the new recipe version.

What Changed

  • Bumped the @dfinity/static-site recipe from v0.3.3 to v1.0.0 in static-website/icp.yaml and in the frontend canister.yaml of the hello-world React, Svelte and Vue templates.
  • Updated static-website/README.md to name the static-site recipe instead of the old asset-canister recipe. This covers the example type value and the releases link, which now filters on static-site.

🤖 Generated with Claude Code

Risk Assessment

✅ Low: The change only moves the version pin from v0.3.3 to v1.0.0 in all four templates that use the static-site recipe and updates README wording. The v1.0.0 recipe template has the same configuration parameters (dir, build, presync, metadata) and the same step types as v0.3.3; only the pinned certified-assets canister and plugin URLs and hashes changed.

Testing

I used the repo's own end-to-end harness in the pinned icp-dev-env-all:1.3.0 container (icp 1.3.0). I gave it a custom matrix that adds the svelte frontend and the static-website template, since the stock matrix doesn't test either. For every template using the v1.0.0 recipe, the full user flow passed: icp new, build, local network, deploy, backend call, and an HTTP 200 with a non-empty page through the gateway. There are no screenshots because this is a config-only version bump with no UI change; the deploy and serve transcript in the log is the evidence. The temporary source copy is deleted, the container is gone, and the worktree is clean.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
hello-world (motoko + react): icp new, build and deploy with the static-site@v1.0.0 frontend, then the frontend serves HTTP 200 through the local gateway ✅ pass live e2e-static-site.log: hello-world:motoko:react PASS; synced 7 assets; curl to frontend.local.localhost:8000 returned 200
hello-world (motoko + vue): build, deploy and serve with the static-site@v1.0.0 frontend ✅ pass live e2e-static-site.log: hello-world:motoko:vue PASS
hello-world (motoko + svelte): build, deploy and serve with the static-site@v1.0.0 frontend (not in the stock matrix) ✅ pass live e2e-static-site.log: hello-world:motoko:svelte PASS
static-website template: icp new, build and deploy with static-site@v1.0.0, then the site serves HTTP 200 (not in the stock matrix) ✅ pass live e2e-static-site.log: static-website PASS; synced 5 assets; curl returned 200
Every template is updated: no static-site@v0.3.3 or asset-canister@ references are left ✅ pass live grep over the YAML/MD/liquid templates finds only v1.0.0 in all 4 recipe references and <version> placeholders in the README
Evidence: E2E transcript for templates using the static-site recipe
icp 1.3.0

========== hello-world:motoko:react ==========

==> render: icp new e2e-hello-world-motoko-react --subfolder hello-world -d backend_type=motoko -d frontend_type=react
7:1 | "backend_type: motoko"
19:1 | "frontend_type: react"

==> build: icp build
Building canisters:
Canisters built successfully

==> network: icp network start -d
For background mode, network output will be redirected:
  stdout: /tmp/tmp.syTOK4SgqX/e2e-hello-world-motoko-react/e2e-hello-world-motoko-react/.icp/cache/networks/local/network-launcher/stdout.log
  stderr: /tmp/tmp.syTOK4SgqX/e2e-hello-world-motoko-react/e2e-hello-world-motoko-react/.icp/cache/networks/local/network-launcher/stderr.log
Network started on port 8000
Seeding ICP and cycles account balances
To stop the network, run `icp network stop`

==> deploy: icp deploy
Building canisters:
Creating canisters:
Created canister backend with ID 4caro-hl777-77775-aaaba-cai
Created canister frontend with ID 4fbx2-kt777-77775-aaabq-cai
Setting environment variables:
Checking compatibility:
Installing canisters:
Syncing canisters:
[frontend] synced 7 asset(s) to canister; canister reports state hash 516e14669e0d9f8c518877fae3aa393edaa7ec76e857e250320fee01a838621b
Deployed canisters:

Frontends (serving http_request):
  frontend: http://frontend.local.localhost:8000/

Backends (Candid UI):
  backend: http://4mc4g-43777-77775-aaaaa-cai.localhost:8000/?id=4caro-hl777-77775-aaaba-cai

==> call: icp canister call backend greet '("ICP")'
("Hello, ICP!")

==> http: curl http://frontend.local.localhost:8000/

========== hello-world:motoko:vue ==========

==> render: icp new e2e-hello-world-motoko-vue --subfolder hello-world -d backend_type=motoko -d frontend_type=vue
7:1 | "backend_type: motoko"
19:1 | "frontend_type: vue"

==> build: icp build
Building canisters:
Canisters built successfully

==> network: icp network start -d
For background mode, network output will be redirected:
  stdout: /tmp/tmp.syTOK4SgqX/e2e-hello-world-motoko-vue/e2e-hello-world-motoko-vue/.icp/cache/networks/local/network-launcher/stdout.log
  stderr: /tmp/tmp.syTOK4SgqX/e2e-hello-world-motoko-vue/e2e-hello-world-motoko-vue/.icp/cache/networks/local/network-launcher/stderr.log
Network started on port 8000
Seeding ICP and cycles account balances
To stop the network, run `icp network stop`

==> deploy: icp deploy
Building canisters:
Creating canisters:
Created canister backend with ID 4caro-hl777-77775-aaaba-cai
Created canister frontend with ID 4fbx2-kt777-77775-aaabq-cai
Setting environment variables:
Checking compatibility:
Installing canisters:
Syncing canisters:
[frontend] synced 7 asset(s) to canister; canister reports state hash 0432f2bbb01f7a19a933c0a4456fc0036bdf703c545dbb76a8ef1ab2666013fd
Deployed canisters:

Frontends (serving http_request):
  frontend: http://frontend.local.localhost:8000/

Backends (Candid UI):
  backend: http://4mc4g-43777-77775-aaaaa-cai.localhost:8000/?id=4caro-hl777-77775-aaaba-cai

==> call: icp canister call backend greet '("ICP")'
("Hello, ICP!")

==> http: curl http://frontend.local.localhost:8000/

========== hello-world:motoko:svelte ==========

==> render: icp new e2e-hello-world-motoko-svelte --subfolder hello-world -d backend_type=motoko -d frontend_type=svelte
7:1 | "backend_type: motoko"
19:1 | "frontend_type: svelte"

==> build: icp build
Building canisters:
Canisters built successfully

==> network: icp network start -d
For background mode, network output will be redirected:
  stdout: /tmp/tmp.syTOK4SgqX/e2e-hello-world-motoko-svelte/e2e-hello-world-motoko-svelte/.icp/cache/networks/local/network-launcher/stdout.log
  stderr: /tmp/tmp.syTOK4SgqX/e2e-hello-world-motoko-svelte/e2e-hello-world-motoko-svelte/.icp/cache/networks/local/network-launcher/stderr.log
Network started on port 8000
Seeding ICP and cycles account balances
To stop the network, run `icp network stop`

==> deploy: icp deploy
Building canisters:
Creating canisters:
Created canister backend with ID 4caro-hl777-77775-aaaba-cai
Created canister frontend with ID 4fbx2-kt777-77775-aaabq-cai
Setting environment variables:
Checking compatibility:
Installing canisters:
Syncing canisters:
[frontend] synced 7 asset(s) to canister; canister reports state hash cfeefbcccb0e3e7340056156aec823dfb558468968cb50ecbc41bfaada8f48be
Deployed canisters:

Frontends (serving http_request):
  frontend: http://frontend.local.localhost:8000/

Backends (Candid UI):
  backend: http://4mc4g-43777-77775-aaaaa-cai.localhost:8000/?id=4caro-hl777-77775-aaaba-cai

==> call: icp canister call backend greet '("ICP")'
("Hello, ICP!")

==> http: curl http://frontend.local.localhost:8000/

========== static-website ==========

==> render: icp new e2e-static-website --subfolder static-website 

==> build: icp build
Building canisters:
Canisters built successfully

==> network: icp network start -d
For background mode, network output will be redirected:
  stdout: /tmp/tmp.syTOK4SgqX/e2e-static-website/e2e-static-website/.icp/cache/networks/local/network-launcher/stdout.log
  stderr: /tmp/tmp.syTOK4SgqX/e2e-static-website/e2e-static-website/.icp/cache/networks/local/network-launcher/stderr.log
Network started on port 8000
Seeding ICP and cycles account balances
To stop the network, run `icp network stop`

==> deploy: icp deploy
Building canisters:
Creating canisters:
Created canister frontend with ID 4caro-hl777-77775-aaaba-cai
Setting environment variables:
Checking compatibility:
Installing canisters:
Syncing canisters:
[frontend] synced 5 asset(s) to canister; canister reports state hash 3d96fbd3b2abc18e8335235751c59ab092ef6d9617f80813ea6c4a0b2e205fc7
Deployed canisters:

Frontends (serving http_request):
  frontend: http://frontend.local.localhost:8000/

==> http: curl http://frontend.local.localhost:8000/

========== summary ==========
PASS  hello-world:motoko:react  (37s)
PASS  hello-world:motoko:vue  (27s)
PASS  hello-world:motoko:svelte  (25s)
PASS  static-website  (20s)
exit=0
Evidence: Matrix used for the targeted e2e run
templates:
  hello-world:
    permutations:
      - { backend_type: motoko, frontend_type: react }
      - { backend_type: motoko, frontend_type: vue }
      - { backend_type: motoko, frontend_type: svelte }
    canisters:
      - name: backend
        call:
          method: greet
          args: '("ICP")'
          expect: 'Hello, ICP!'
      - name: frontend
        curl: true
  static-website:
    permutations:
      - {}
    canisters:
      - name: frontend
        curl: true
Evidence: E2E summary
PASS hello-world:motoko:react (37s)
PASS hello-world:motoko:vue (27s)
PASS hello-world:motoko:svelte (25s)
PASS static-website (20s)
exit=0

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
hello-world (motoko + react): icp new, build and deploy with the static-site@v1.0.0 frontend, then the frontend serves HTTP 200 through the local gateway ✅ pass live e2e-static-site.log: hello-world:motoko:react PASS; synced 7 assets; curl to frontend.local.localhost:8000 returned 200
hello-world (motoko + vue): build, deploy and serve with the static-site@v1.0.0 frontend ✅ pass live e2e-static-site.log: hello-world:motoko:vue PASS
hello-world (motoko + svelte): build, deploy and serve with the static-site@v1.0.0 frontend (not in the stock matrix) ✅ pass live e2e-static-site.log: hello-world:motoko:svelte PASS
static-website template: icp new, build and deploy with static-site@v1.0.0, then the site serves HTTP 200 (not in the stock matrix) ✅ pass live e2e-static-site.log: static-website PASS; synced 5 assets; curl returned 200
Every template is updated: no static-site@v0.3.3 or asset-canister@ references are left ✅ pass live grep over the YAML/MD/liquid templates finds only v1.0.0 in all 4 recipe references and <version> placeholders in the README
  • git diff ef03698 0d24df6 plus a grep over the YAML/MD/liquid templates, to confirm all 4 static-site recipe references now say v1.0.0 and none still say v0.3.3 or asset-canister@
  • git archive HEAD copied into a disposable git repo in /tmp (the worktree's .git pointer doesn't resolve inside the container), then checked that the copy's static-website/icp.yaml says static-site@v1.0.0
  • docker run ghcr.io/dfinity/icp-dev-env-all:1.3.0 /repo/tests/run.sh with CONFIG=matrix-static-site.yaml covering hello-world:motoko:{react,vue,svelte} and static-website. Each permutation ran icp new, icp build, icp network start, icp deploy, a backend greet call and a frontend gateway curl expecting HTTP 200. Container exit status 0, all 4 PASS
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@raymondk
raymondk requested a review from a team as a code owner November 18, 2026 18:26
Copilot AI balanced review requested due to automatic review settings November 18, 2026 18:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the static-site recipe updates and accompanying documentation corrections.

No open issues 🎉

What changed in this PR

Updates all four templates using @dfinity/static-site to recipe v1.0.0, keeping generated projects aligned with the latest recipe release.

Changes:

  • Bumps recipe pins from v0.3.3 to v1.0.0 without changing configuration parameters.
  • Corrects the static website README’s recipe name, configuration example, and releases link.
File Description
static-website/​README.md Replaces outdated asset-canister documentation with static-site.
static-website/​icp.yaml Updates the static website recipe to v1.0.0.
hello-world/​vue-frontend/​canister.yaml Updates the Vue frontend recipe to v1.0.0.
hello-world/​svelte-frontend/​canister.yaml Updates the Svelte frontend recipe to v1.0.0.
hello-world/​react-frontend/​canister.yaml Updates the React frontend recipe to v1.0.0.

Review effort: Balanced

@raymondk
raymondk enabled auto-merge (squash) November 19, 2026 00:40
@raymondk
raymondk merged commit 00fa522 into main Nov 19, 2026
7 checks passed
@lwshang
lwshang deleted the fm/templates-static-site-v1-m3 branch November 19, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants