Update README.md
This commit is contained in:
25
README.md
25
README.md
@@ -1,4 +1,8 @@
|
||||
# website-products
|
||||
---
|
||||
gitea: none
|
||||
include_toc: true
|
||||
---
|
||||
|
||||
|
||||
官网产品页面的代码,基本思路是:
|
||||
|
||||
@@ -19,11 +23,15 @@
|
||||
- 放置在 plugin 文件夹下
|
||||
- `wp-content/plugin/react-product-loader`
|
||||
|
||||

|
||||
|
||||
`./page-react-template.php`
|
||||
- 用于展示产品的模板页面,不使用官网默认的模板
|
||||
- 放置在当前使用的模板下面:
|
||||
- `wp-content/themes/skyline-wp`
|
||||
|
||||

|
||||
|
||||
## 产品页面
|
||||
|
||||
- 产品的页面放在 `wp-content/products/react-apps` 下
|
||||
@@ -33,17 +41,20 @@
|
||||
1. 运行 `npm run build`
|
||||
2. 将生成的 `dist/static/assets` 下的 `index-....js` 和 `index-....css` 放到 wordpress 中
|
||||
- 放在 `wp-content/products/react-apps` 目录下
|
||||
3. 在 wordpress 「固定ページ」中创建页面,使用 `ショートコード` 引入
|
||||
3. 在 wordpress 「**固定ページ**」中创建页面,使用 `ショートコード` 引入
|
||||
- 输入 `[react_app app_name="alisurvey"]`
|
||||
- 其中 `app_name` (这里是 `alisurvey`)是项目文件夹名字(与下面开发事项提到的 `baseUrl` 也一样)
|
||||
4. 设置使用的模板名称为: **React Product Template**
|
||||
|
||||
> `index.html` 不需要导入,所以页面 meta、descirption 之类都在「固定ページ」中设置
|
||||
> `index.html` 不需要导入,所以页面 meta、descirption 之类都在「**固定ページ**」中设置
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
# 开发事项
|
||||
|
||||
当 coze 生成了 react 代码之后,需要做一些修改:
|
||||
当 coze 生成了 react 代码之后,需要做一些修改
|
||||
|
||||
## 1. 修改 baseUrl
|
||||
|
||||
@@ -81,3 +92,9 @@ export default defineConfig({
|
||||
+ "build": "rm -rf dist && npm run build:client && cp package.json dist && touch dist/build.flag"
|
||||
},
|
||||
```
|
||||
|
||||
## 可用的 AI 生成网站的工具:
|
||||
|
||||
1. [字节的扣子空间 Coze](https://space.coze.cn/expert/10000)
|
||||
2. [lovable.dev](https://lovable.dev/)
|
||||
3. [readdy.ai](https://readdy.ai/)
|
||||
Reference in New Issue
Block a user