{"id":15646379,"url":"https://github.com/neveryu/prerender-website","last_synced_at":"2025-04-30T12:21:37.030Z","repository":{"id":99810053,"uuid":"135810778","full_name":"Neveryu/prerender-website","owner":"Neveryu","description":":wave::wave::wave:基于 Vue 的预渲染解决方案","archived":false,"fork":false,"pushed_at":"2019-03-31T14:37:55.000Z","size":4029,"stargazers_count":47,"open_issues_count":1,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-26T16:02:32.935Z","etag":null,"topics":["es6","express","node","prerender","stylus","vue","vue-router","webpack"],"latest_commit_sha":null,"homepage":"https://neveryu.github.io/prerender-website/","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Neveryu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-06-02T11:06:03.000Z","updated_at":"2024-09-14T05:43:38.000Z","dependencies_parsed_at":"2023-08-01T04:31:27.927Z","dependency_job_id":null,"html_url":"https://github.com/Neveryu/prerender-website","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neveryu%2Fprerender-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neveryu%2Fprerender-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neveryu%2Fprerender-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neveryu%2Fprerender-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Neveryu","download_url":"https://codeload.github.com/Neveryu/prerender-website/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232545205,"owners_count":18539620,"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":["es6","express","node","prerender","stylus","vue","vue-router","webpack"],"created_at":"2024-10-03T12:12:37.771Z","updated_at":"2025-01-05T03:55:06.524Z","avatar_url":"https://github.com/Neveryu.png","language":"Vue","readme":"# A beautiful website with tour\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://travis-ci.org/Neveryu/web-bookmarks\"\u003e\u003cimg src=\"https://travis-ci.org/Neveryu/web-bookmarks.svg?branch=master\" alt=\"Travis CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/Neveryu/prerender-website/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/NeverYu/prerender-website.svg\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://neveryu.github.io/reward/index.html\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/%24-donate-ff69b4.svg\" alt=\"donate\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003eVue.js 2.0 + vue-router + prerender-spa-plugin 3.x Prerender SPA Example\n\n这里使用的是 `prerender-spa-plugin` stable `3.x` 版本，基于 `puppeteer`。\n如果你使用的 `2.x` 版本，则是基于 `PhantomJS`。\n\n**重要提示：** 如果你在 `npm install` 时一直没有没有等到成功的结果，你可以尝试删除掉 `package-lock.json` 和 `node_modules` 再尝试；如果还是不行，你可以选择尝试删除掉 `package-lock.json` 和 `node_modules` 后，使用 `npm install --registry=https://registry.npm.taobao.org` 来安装。（究其原因，我在 `web-bookmarks` 中有提到：[npm 与 cnpm 要点](https://neveryu.github.io/web-bookmarks/tech/npm-cnpm.html)）\n\nDemonstrates usage of Vuejs 2.0 with Vue Router and Webpack 3. Build will generate 6 static routes at the following paths:\n\n- `/`\n- `/home`\n- `/information`\n- `/ticket`\n- `/scenery`\n- `/about`\n\n## Build\n``` bash\nnpm install\nnpm run build\n```\n\n\u003e **重要提示：** 如果你在 `npm install` 时一直没有没有等到成功的结果，你可以尝试删除掉 `package-lock.json` 和 `node_modules` 再尝试；如果还是不行，你可以选择尝试删除掉 `package-lock.json` 和 `node_modules` 后，使用 `npm install --registry=https://registry.npm.taobao.org` 来安装。（究其原因，我在 `web-bookmarks` 中有提到：[npm 与 cnpm 要点](https://neveryu.github.io/web-bookmarks/tech/npm-cnpm.html)）\n\nNow check the new `dist` directory for your prerendered static files!\n\nTo view the rendered files, you can\n``` bash\nnpm run prod\n```\n\nNow visit the following routes in your browser (note the trailing slash):\n\n- [http://localhost:9999/](http://localhost:9999/)\n- [http://localhost:9999/home](http://localhost:9999/home)\n- [http://localhost:9999/information/](http://localhost:9999/information/)\n- [http://localhost:9999/ticket/](http://localhost:9999/ticket/)\n- [http://localhost:9999/scenery/](http://localhost:9999/scenery/)\n- [http://localhost:9999/about/](http://localhost:9999/about/)\n\n## Development\n\nTo edit the `prerender-spa-plugin` configuration, look for `new PrerenderSPAPlugin` in the plugins section of `webpack.config.js`.\n\nIf you're using a router or have more than one page to prerender, edit the `routes` array under that config object.\n\n``` bash\nnpm install\nnpm run dev\n```\n\n\u003e **重要提示：** 如果你在 `npm install` 时一直没有没有等到成功的结果，你可以尝试删除掉 `package-lock.json` 和 `node_modules` 再尝试；如果还是不行，你可以选择尝试删除掉 `package-lock.json` 和 `node_modules` 后，使用 `npm install --registry=https://registry.npm.taobao.org` 来安装。（究其原因，我在 `web-bookmarks` 中有提到：[npm 与 cnpm 要点](https://neveryu.github.io/web-bookmarks/tech/npm-cnpm.html)）\n\n## Tip\n\n- 1.1 在开发过程中(`npm run dev`)，`vue-router` 请务必使用 `history` 模式。\n- 2.1 如果你的项目是部署在根目录下的话，那么你可以直接打包(`npm run build`)\n，然后进行部署。\n- 2.2 如果你的项目要部署在子目录下的话，那么你可能要注意了，这个时候你的 `vue-router` 不应该使用 `history` 模式，与此同时，`publicPath` 也应修改为 `./`\n\n\n## Note\n在写这个项目的时候也记录了几个知识点：[关于本项目中的知识点](./project-note.md)\n\n## Communication\n\n欢迎加入 QQ 群，共同学习讨论，QQ 群：[685486827](//shang.qq.com/wpa/qunwpa?idkey=32da7a18744756b0d8ffdd05b84999afecb5265dbad0fb119033e122abe803f3) ，\u003ca target=\"_blank\" href=\"//shang.qq.com/wpa/qunwpa?idkey=32da7a18744756b0d8ffdd05b84999afecb5265dbad0fb119033e122abe803f3\"\u003e一键加群\u003c/a\u003e\n\n\u003cimg src=\"https://neveryu.github.io/images/qq-group.png\" alt=\"vue-music\" width=\"250\"\u003e\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneveryu%2Fprerender-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneveryu%2Fprerender-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneveryu%2Fprerender-website/lists"}