{"id":17645335,"url":"https://github.com/mazeyqian/multipage-template","last_synced_at":"2025-03-18T20:48:32.182Z","repository":{"id":37927098,"uuid":"108249117","full_name":"mazeyqian/multipage-template","owner":"mazeyqian","description":"Webpack multi-page and GitLab incremental build deployment template/Webpack 多页面\u0026GitLab 增量构建部署模板","archived":false,"fork":false,"pushed_at":"2024-07-24T05:55:05.000Z","size":886,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-10T18:44:25.950Z","etag":null,"topics":["cicd","gitlab","html","multi-page","template","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mazeyqian.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}},"created_at":"2017-10-25T09:32:54.000Z","updated_at":"2024-11-02T16:14:30.000Z","dependencies_parsed_at":"2023-02-10T09:01:35.191Z","dependency_job_id":"bd59834e-90f1-45ed-aba6-eedb6b25b8e0","html_url":"https://github.com/mazeyqian/multipage-template","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazeyqian%2Fmultipage-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazeyqian%2Fmultipage-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazeyqian%2Fmultipage-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mazeyqian%2Fmultipage-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mazeyqian","download_url":"https://codeload.github.com/mazeyqian/multipage-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244306069,"owners_count":20431737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cicd","gitlab","html","multi-page","template","webpack"],"created_at":"2024-10-23T10:55:03.476Z","updated_at":"2025-03-18T20:48:32.141Z","avatar_url":"https://github.com/mazeyqian.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"English | [简体中文](./README_CN.md)\n\n# multipage-template\n\nWebpack multi-page and GitLab incremental build deployment template.\n\n## Entry\n\nEach new standalone page only needs to create a folder under `pages`, but must have two entry files: `index.html` and `index.js`.\n\n```\n├── package.json\n└── src\n    ├── index.js // pages - You can put common things on the outside.\n    └── pages\n        ├── page1\n        │   ├── index.js\n        │   └── index.html\n        └── page2\n            ├── style.css\n            ├── index.js\n            └── index.html\n```\n\n## Output\n\nEach packaged page is independent.\n\n```\n├── package.json\n└── dist\n    ├── page1\n    │   ├── index.html\n    │   └── 20210526.194300\n    │       ├── 7ffaa4103cae71b1629a.css\n    │       └── 7ffaa4103cae71b1629a.js\n    └── page2\n        ├── index.html\n        └── 20210526.194300\n            ├── 88870cd4b2e554c2a754.css\n            └── 88870cd4b2e554c2a754.js\n```\n\n## Deploy\n\n### Aliyun OSS\n\nUse GitLab variable to run out of modified `pages` folder, and use Aliyun OSS CLI [aliyunoss-cli](https://github.com/mazeyqian/aliyunoss-cli) to upload packaged files automatically.\n\n```\nsearch_dir=src/pages\nfor path in \"$search_dir\"/*; do\necho \"$(git diff HEAD~ --name-only | grep \"$path\")\"\n    if [ \"$(git diff HEAD~ --name-only | grep \"$path/\")\" ]; then\n        page_name=$(basename $path)\n        echo \"[CI] Page \\\"$page_name\\\" has been modified\"\n        echo \"[CI] Start building\"\n        npx cross-env NODE_ENV=production PAGE=$page_name node build/build.js\n    fi\ndone\n```\n\n### Docker\n\nThe page can be visited on `http://localhost:7415` by running the command: `bash DockerBuild.sh`.\n\n## Notification\n\n### WeixinWork\n\nThe notification will be opened after filling the file: `build\\shell\\notification.sh`.\n\n## Reference\n\n[Use GitLab CI/CD and Aliyun CLI to deploy front-end projects](https://blog.mazey.net/1695.html)\n\n## Appendix\n\nAddress of this project: [https://github.com/mazeyqian/multipage-template](https://github.com/mazeyqian/multipage-template)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazeyqian%2Fmultipage-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmazeyqian%2Fmultipage-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmazeyqian%2Fmultipage-template/lists"}