Skip to content

Commit 321ff41

Browse files
9reclaude
andcommitted
Fix GitHub Pages demo by loading library and data from Cloudflare CDN
GitHub Pages is configured in legacy build mode (serves main:/docs directly), so the GitHub Actions workflow's artifact is ignored. Built files under docs/dist/ are gitignored and therefore never reach the deployed site, causing "Jpostcode is not defined" errors on matzlika.github.io/jpostcode-js/. Point the demo's script src and Jpostcode.setBaseUrl() at the Cloudflare Pages distribution so the page works regardless of which host serves the HTML. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 481c275 commit 321ff41

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docs/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,10 @@ <h3>Node.js / TypeScript</h3>
501501
</div>
502502
</footer>
503503

504-
<script src="./dist/jpostcode-web.js"></script>
504+
<script src="https://jpostcode-js.pages.dev/dist/jpostcode-web.js"></script>
505505
<script>
506+
Jpostcode.setBaseUrl('https://jpostcode-js.pages.dev/data/json/');
507+
506508
// --- フォーム自動入力デモ ---
507509
const autofillZip = document.getElementById('autofillZip');
508510
const autofillPref = document.getElementById('autofillPref');

0 commit comments

Comments
 (0)