= () => {
如果需要启用静态网站,则需要模板类型为自适应模板才行。开启静态网站需要填写静态网站服务器信息,通信成功后系统会自动传输静态页面到静态网站服务器。
- 启用静态网站前,需要开启静态页面缓存。启用静态网站后,搜索、留言、评论、301跳转等需要提交数据到后台的功能,均会失效,网站仅有展示效果。
+ 启用静态网站前,需要先开启静态页面缓存
+ 。启用静态网站后,搜索、留言、评论、301跳转等需要提交数据到后台的功能,均会失效,网站仅有展示效果。
启用静态网站后,以下的操作不会自动重新生成,需要手动执行静态页面生成操作:
diff --git a/src/pages/plugin/push/index.tsx b/src/pages/plugin/push/index.tsx
index 467ea44..521b980 100644
--- a/src/pages/plugin/push/index.tsx
+++ b/src/pages/plugin/push/index.tsx
@@ -178,6 +178,16 @@ const PluginPush: React.FC
= (props) => {
extra="如:https://ssl.bing.com/webmaster/api.svc/json/SubmitUrlbatch?apikey=sampleapikeyEDECC1EA4AE341CC8B6(注意该APIkey在必应工具右上角的设置中设置)"
/>
+
+
+
actionRef={actionRef}
diff --git a/src/pages/plugin/robots/index.tsx b/src/pages/plugin/robots/index.tsx
index df97c54..b4c1774 100644
--- a/src/pages/plugin/robots/index.tsx
+++ b/src/pages/plugin/robots/index.tsx
@@ -6,7 +6,7 @@ import { pluginGetRobots, pluginSaveRobots } from '@/services/plugin/robots';
import { useModel } from 'umi';
const PluginRobots: React.FC = (props) => {
- const { initialState } = useModel('@@initialState');
+ const { initialState, setInitialState } = useModel('@@initialState');
const [pushSetting, setPushSetting] = useState({});
const [fetched, setFetched] = useState(false);
@@ -29,14 +29,43 @@ const PluginRobots: React.FC = (props) => {
})
.catch((err) => {
console.log(err);
- }).finally(() => {
+ })
+ .finally(() => {
hide();
});
};
+
+ const getFrontUrl = async (link: string) => {
+ let baseUrl = '';
+ if (!initialState.system) {
+ const system = await initialState?.fetchSystemSetting?.();
+ if (system) {
+ await setInitialState((s) => ({
+ ...s,
+ system: system,
+ }));
+ }
+ baseUrl = system?.base_url || '';
+ } else {
+ baseUrl = initialState.system?.base_url || '';
+ }
+
+ return baseUrl + link;
+ };
+
return (
-
+
+ Robots是网站告诉搜索引擎蜘蛛哪些页面可以抓取,哪些页面不能抓取的配置。Q:{' '}
+
+ robots.txt文件的格式
+
+
+ }
+ />
{fetched && (
@@ -58,15 +87,16 @@ const PluginRobots: React.FC = (props) => {
)}
-
-
-
+
+
+
);
diff --git a/src/pages/setting/safe.tsx b/src/pages/setting/safe.tsx
index 9930cd5..4c40f12 100644
--- a/src/pages/setting/safe.tsx
+++ b/src/pages/setting/safe.tsx
@@ -57,7 +57,7 @@ const SettingSafeFrom: React.FC = (props) => {
/>
= (props) => {
label: '开启',
},
]}
- extra="如需开启验证码,请参考验证码标签使用js调用刷新验证码和提交验证数据"
+ extra="如需开启验证码,请参考验证码标签使用js调用刷新验证码和提交验证数据。开启后,前台用户登录、留言、评论都需要验证码"
/>