我正在使用react-snapshot
并将文件作为静态版本提供。
当我使用facebook调试器抓取页面时,它只会显示放置在index.html
文件中的首页标题。
我想获取其他页面的动态数据。我使用了react-helmet
,但这也不起作用。由于项目已经完成,因此我无法切换到其他框架,也无法寻找一些调整来实现页面的SEO和动态内容提取。
使用此命令来构建我的项目
"build": "react-scripts build && react-snapshot"
使用快照渲染
import { render } from 'react-snapshot';
render(<App/>, document.getElementById('root'));