{"id":50289266,"url":"https://github.com/maxzz/pm-tests-piggybacks","last_synced_at":"2026-05-28T04:33:33.909Z","repository":{"id":358366669,"uuid":"1240336724","full_name":"maxzz/pm-tests-piggybacks","owner":"maxzz","description":"Test cases","archived":false,"fork":false,"pushed_at":"2026-05-25T04:29:55.000Z","size":3286,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T06:35:30.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://maxzz.github.io/pm-tests-piggybacks","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxzz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-16T02:53:23.000Z","updated_at":"2026-05-25T04:01:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/maxzz/pm-tests-piggybacks","commit_stats":null,"previous_names":["maxzz/pm-tests-piggybacks"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxzz/pm-tests-piggybacks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxzz%2Fpm-tests-piggybacks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxzz%2Fpm-tests-piggybacks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxzz%2Fpm-tests-piggybacks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxzz%2Fpm-tests-piggybacks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxzz","download_url":"https://codeload.github.com/maxzz/pm-tests-piggybacks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxzz%2Fpm-tests-piggybacks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33594851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-28T04:33:32.759Z","updated_at":"2026-05-28T04:33:33.904Z","avatar_url":"https://github.com/maxzz.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pm-tests-piggybacks\n\n## Table of contents\n\n- [Overview](#overview)\n- [Adding a new page](#adding-a-new-page)\n- [URLs](#urls)\n- [Shared code](#shared-code)\n\n## Overview\n\n**pm-tests-piggybacks** is a small **multi-page (MPA)** front-end used for **piggyback / PM-related tests** (see `package.json` description). The app is built with **Vite** and **TypeScript**: the site root is one HTML entry, and each **first-level folder** under `pages/` is another HTML entry with its own scripts and styles.\n\nA **page list** is generated from the filesystem so the shared header can render navigation links without hand-maintaining URLs. The generator (`pnpm gen:pages`) writes `src/components/9-pages.ts`; **`pnpm dev`** and **`pnpm build`** run that step first. Shared utilities used across pages live in **`shared/`** and are imported via the **`@shared/*`** path alias.\n\n## Adding a new page\n\n1. **Create a folder** under `pages/`, for example `pages/my-feature/`.\n\n2. **Add `index.html`** inside that folder. It is required: the page generator scans **every direct child directory** of `pages/` and expects `index.html` in each one. If any folder is missing it, `pnpm gen:pages` will fail with a clear error.\n\n3. **Wire scripts and styles** (same pattern as existing pages such as `pages/page-b/`):\n   - In `\u003chead\u003e`, link shared nav styles:  \n     `\u003clink rel=\"stylesheet\" href=\"/src/nav.css\" /\u003e`\n   - Shared header/nav (built from generated data):  \n     `\u003cscript type=\"module\" src=\"/src/components/1-headers.ts\"\u003e\u003c/script\u003e`\n   - Optional page bundle:  \n     `\u003cscript type=\"module\" src=\"./main.ts\"\u003e\u003c/script\u003e`\n   - Keep a placeholder for the nav:  \n     `\u003cnav id=\"page-nav\" aria-label=\"Pages\"\u003e\u003c/nav\u003e`\n\n4. **Optional `main.ts`** (and `style.css`, etc.) next to `index.html` for page-only TypeScript and CSS.\n\n5. **Regenerate the page list** so the root nav includes your route:\n\n   ```bash\n   pnpm gen:pages\n   ```\n\n   This runs `scripts/generate-pages.js` and updates `src/components/9-pages.ts` (do not edit that file by hand). `pnpm dev` and `pnpm build` run `gen:pages` first.\n\n6. **Build / preview** as usual:\n\n   ```bash\n   pnpm dev\n   pnpm build\n   pnpm preview\n   ```\n\n## URLs\n\nEach page is served as a separate URL, for example:\n\n`/pages/my-feature/`\n\nIn `9-pages.ts`, each entry’s `path` is **repo-root–relative** with a **`./`** prefix (for example `./pages/my-feature`). Nav resolves that with **`import.meta.env.BASE_URL`** so links work at the site root and on **GitHub Pages** (for example `https://user.github.io/repo-name/...`). Set Vite `base` to your repo name when publishing (for example `base: '/pm-tests-piggybacks/'`).\n\n## Shared code\n\nReusable helpers and types live under `shared/` and are imported with the `@shared/…` alias (see `tsconfig.json` and `vite.config.ts`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxzz%2Fpm-tests-piggybacks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxzz%2Fpm-tests-piggybacks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxzz%2Fpm-tests-piggybacks/lists"}