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 之类的托管平台
+支持备份全站数据
+备份全站数据,支持下载到本地
支持 Hexo/Jekyll 文章导入并解析元数据
+支持 Hexo/Jekyll 文章导入并解析元数据