prer#107
Merged
Merged
Conversation
新增 robots.txt 文件以控制搜索引擎爬虫的访问权限,并添加 sitemap.xml 文件以便于搜索引擎索引网站内容。 - robots.txt 允许所有用户代理访问,并禁止访问不必要的文件。 - sitemap.xml 提供网站的结构信息,帮助搜索引擎更好地抓取页面。
- Updated pnpm workspace to include puppeteer as a built dependency. - Implemented prerendering in App.vue to mark the page as ready for SEO. - Enhanced vite.config.js to integrate the vite-prerender plugin for static page generation. - Created comprehensive SEO_BUILD_GUIDE.md for instructions on SEO build process. - Developed vite-prerender.js plugin to handle page rendering with Playwright. - Configured prerender.config.js to define page combinations for prerendering. - Added PowerShell script for building SEO optimized versions with prerendering. - Implemented crawler detection in server/crawler-detection.js to serve static pages for bots.
实现了客户端爬虫检测脚本,能够在静态部署环境中识别爬虫并进行相应处理。 同时,增加了SEO重定向逻辑,确保用户访问时能够正确导航到SPA应用。 - 在静态页面中注入爬虫检测脚本。 - 处理SEO重定向路径,支持多语言和版本参数。 - 更新了SEO功能测试脚本以验证新功能。 Closes #123
修改了预渲染配置以支持生成 sitemap.xml 和 robots.txt 文件。 更新了相关的构建脚本和测试脚本,移除了不再使用的文件。 - 修改了 `vite-prerender.js` 以生成 sitemap 和 robots.txt。 - 更新了 `prerender.config.js` 的基础 URL。 - 移除了不再需要的 PowerShell 构建脚本和爬虫检测服务器。
…p and robots.txt generation
调整了构建流程中的 Node.js 安装步骤,添加了 pnpm 缓存配置,以提高依赖安装的效率。 - 在 Node.js 安装步骤中添加了缓存配置。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces SEO optimization features to the project, enabling pre-rendering of static pages for improved search engine visibility. The changes include updates to workflows, scripts, and documentation, as well as the addition of new dependencies and plugins to support SEO builds. Below is a summary of the most important changes:
Workflow Enhancements for SEO Builds:
.github/workflows/build_and_publish.yml: Added an optionalenable_seoinput to allow SEO optimization during version publishing. Updated steps to install Playwright and run SEO-specific build commands when enabled. [1] [2] [3].github/workflows/build_beta.yml: Introduced abuild_typeinput with options forlocal_use,website, andwebsite_seo. Updated steps to conditionally install Playwright and execute the appropriate build based on the selected type. [1] [2]SEO Build Features and Documentation:
docs/SEO_BUILD_GUIDE.md: Added detailed documentation outlining the SEO build process, including features, local testing, deployment steps, and troubleshooting tips.package.json: Added new scripts for SEO builds (build:website:seo,test:seo) and dependencies such asplaywright,cross-env, andfs-extrato support SEO functionality.Code Changes for SEO Optimization:
plugins/vite-prerender.js: Implemented a Vite plugin for pre-rendering static pages using Playwright. Includes concurrency optimization, crawler detection script injection, and generation ofsitemap.xmlandrobots.txt.Metadata and Content Updates:
index.html: Updated meta tags to improve SEO, including enhanced descriptions, keywords, and author information. Added canonical URL support for pre-rendered pages.README.md: Updated the link to the project's webpage to reflect the new domain.