diff --git a/src/api/staticPage.js b/src/api/staticPage.js new file mode 100644 index 000000000..10f5150f1 --- /dev/null +++ b/src/api/staticPage.js @@ -0,0 +1,39 @@ +import service from '@/utils/service' + +const baseUrl = '/api/admin/static_page' + +const staticPageApi = {} + +staticPageApi.list = () => { + return service({ + url: baseUrl, + method: 'get' + }) +} + +staticPageApi.generate = () => { + return service({ + url: `${baseUrl}/generate`, + method: 'get' + }) +} + +staticPageApi.deploy = () => { + return service({ + url: `${baseUrl}/deploy`, + method: 'get' + }) +} + +staticPageApi.deployType = { + GIT: { + type: 'GIT', + text: 'Git' + }, + NETLIFY: { + type: 'NETLIFY', + text: 'Netlify' + } +} + +export default staticPageApi diff --git a/src/config/router.config.js b/src/config/router.config.js index 2c32156cc..c4fed704c 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -185,6 +185,13 @@ export const asyncRouterMap = [ component: () => import('@/views/system/ToolList'), meta: { title: '小工具', hiddenHeaderContent: false } }, + { + path: '/system/tools/staticpages', + name: 'StaticPagesManage', + hidden: true, + component: () => import('@/views/system/staticpages/StaticPagesManage'), + meta: { title: '静态部署', hiddenHeaderContent: false } + }, { path: '/system/about', name: 'About', diff --git a/src/views/system/ToolList.vue b/src/views/system/ToolList.vue index 3911c5634..7430a3a8f 100644 --- a/src/views/system/ToolList.vue +++ b/src/views/system/ToolList.vue @@ -18,7 +18,7 @@
开发者选项
-

点击进入开发者选项页面

+

点击进入开发者选项页面

进入 + + +
+ 静态部署 +
+

生成静态页面并部署到 Github Pages 之类的托管平台

+ 管理 +
+
博客备份 -

支持备份全站数据

+

备份全站数据,支持下载到本地

Markdown 文章导入 -

支持 Hexo/Jekyll 文章导入并解析元数据

+

支持 Hexo/Jekyll 文章导入并解析元数据

- + @@ -18,7 +21,13 @@ export default { name: 'SettingsForm', data() { return { - options: [] + options: [], + wrapperCol: { + xl: { span: 8 }, + lg: { span: 8 }, + sm: { span: 12 }, + xs: { span: 24 } + } } }, created() { diff --git a/src/views/system/developer/tabs/StaticStorage.vue b/src/views/system/developer/tabs/StaticStorage.vue index 767dbd085..fadfbfacd 100644 --- a/src/views/system/developer/tabs/StaticStorage.vue +++ b/src/views/system/developer/tabs/StaticStorage.vue @@ -27,7 +27,7 @@
+
+ + +
+ + + + 文件列表 + + + + + + 部署平台 + + + + + + 配置 + + + + +
+
+
+
+ + diff --git a/src/views/system/staticpages/tabs/DeploySettingsForm.vue b/src/views/system/staticpages/tabs/DeploySettingsForm.vue new file mode 100644 index 000000000..c9a1a4fbd --- /dev/null +++ b/src/views/system/staticpages/tabs/DeploySettingsForm.vue @@ -0,0 +1,100 @@ + + diff --git a/src/views/system/staticpages/tabs/SettingsForm.vue b/src/views/system/staticpages/tabs/SettingsForm.vue new file mode 100644 index 000000000..2202e09bc --- /dev/null +++ b/src/views/system/staticpages/tabs/SettingsForm.vue @@ -0,0 +1,10 @@ + + diff --git a/src/views/system/staticpages/tabs/StaticPagesList.vue b/src/views/system/staticpages/tabs/StaticPagesList.vue new file mode 100644 index 000000000..56fc626e6 --- /dev/null +++ b/src/views/system/staticpages/tabs/StaticPagesList.vue @@ -0,0 +1,113 @@ + +