內容簡介
此外掛會讀取你的 ReactJS 建置中的 asset-manifest.json 檔案,並將其包含在 WordPress 中,讓你能夠在任何 WordPress 中執行應用程式。
使用方法
你可以在 WordPress 文字編輯器中輸入以下短碼,將你的應用程式嵌入 WordPress 中。
[embed_react_build application_id="root" url="https://react-default.netlify.app"]
短碼參數
application_id — React 應用程式掛載的容器的名稱。
(預設值:root) (必填)
url — React 建置的 URL 位址。
(必填)
staging_url — React 的 Staging 建置的 URL 位址。一旦定義,你可以輸入 ?test=true 在 URL 位址的尾端以存取 Staging 建置。
(選填)
外掛標籤
開發者團隊
原文外掛簡介
This plugin reads the asset-manifest.json file in your ReactJS build and includes it in wordpress and allows you to run your application anywhere in wordpress.
Usage
You can run your application embedded in wordpress by typing the following shortcode in the WordPress text editor.
[embed_react_build application_id="root" url="https://react-default.netlify.app"]
Shortcode Parameters
application_id — The name of the container where the React application is mounted.
(default: root) (required)
url — The URL address of the React Build.
(required)
staging_url — The URL address of the React Staging Build. Once defined, you can access the staging build by typing ?test=true at the end of the url.
(optional)
