Skip to content

Commit

Permalink
feat(demo): upgrade demo site domain
Browse files Browse the repository at this point in the history
  • Loading branch information
surmon-china committed May 7, 2022
1 parent 0498892 commit 1a234ba
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 19 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
 
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/surmon-china/veact-admin/Deploy?label=deploy&style=for-the-badge)](https://github.com/surmon-china/veact-admin/actions?query=workflow:%22Deploy%22)
 
[![GitHub license](https://img.shields.io/github/license/surmon-china/veact-admin.svg?style=for-the-badge)](https://github.com/surmon-china/veact-admin/blob/main/LICENSE)
[![GitHub license](https://img.shields.io/github/license/surmon-china/veact-admin.svg?style=for-the-badge)](/LICENSE)

**Admin client for [surmon.me](https://github.com/surmon-china/surmon.me) blog, powered by [`React`](https://github.com/facebook/react) and [`Veact`](https://github.com/veactjs/veact).**

**适用于 [surmon.me](https://github.com/surmon-china/surmon.me) 博客的管理员后台应用,使用 [`React`](https://github.com/facebook/react)[`Veact`](https://github.com/veactjs/veact) 进行开发。**

> **👁 在线预览:[Online DEMO site](https://github.surmon.me/veact-admin/)**
> **👁 在线预览:[Online DEMO site](https://github.surmon.me/veact-admin)**
> **📝 更新记录:[CHANGELOG.md](https://github.com/surmon-china/veact-admin/blob/main/CHANGELOG.md#changelog)**
> **📝 更新记录:[CHANGELOG.md](/CHANGELOG.md#changelog)**
---

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "veact-admin",
"version": "1.4.1",
"version": "1.4.2",
"author": "Surmon",
"license": "MIT",
"repository": {
Expand Down
4 changes: 1 addition & 3 deletions public/__demo__/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// JSON actions
const fetchJSON = (filePath) => {
return fetch(`/veact-admin/__demo__/mock/${filePath}.json`).then((response) =>
response.json()
)
return fetch(`/__demo__/mock/${filePath}.json`).then((response) => response.json())
}
// first fetch cache data map
const _cacheData = new Map()
Expand Down
2 changes: 1 addition & 1 deletion public/__demo__/mock/article/61030f5fcf1faa098ee126b2.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"title": "旅途感想",
"description": "没有整理好的旅途感想",
"content": "\n旅途的开始,心情是轻松的。\n\n此处省略一万字...\n",
"thumb": "/veact-admin/images/profile/article-thumb.jpg",
"thumb": "/images/profile/article-thumb.jpg",
"extends": [],
"meta": { "likes": 51, "views": 11672, "comments": 39 },
"update_at": "2019-07-24T15:53:33.133Z",
Expand Down
2 changes: 1 addition & 1 deletion public/__demo__/mock/article/610c29438a907384c63fef00.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"title": "今日日记",
"description": "今天发生的一些事情",
"content": "\n今天上海的天气非常好,万里无云。\n\n此处省略一万字...\n",
"thumb": "/veact-admin/images/profile/article-thumb.jpg",
"thumb": "/images/profile/article-thumb.jpg",
"extends": [],
"meta": { "likes": 51, "views": 11672, "comments": 39 },
"update_at": "2019-07-24T15:53:33.133Z",
Expand Down
2 changes: 1 addition & 1 deletion public/__demo__/mock/article/612c81321a53290533a7b782.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"title": "JavaScript 权威指南小结",
"description": "学习总结",
"content": "\n《JavaScript权威指南》是2007年机械工业出版社出版的图书,作者是弗拉纳根(David Flanagan,美)。\n\n本书全面介绍了JavaScript语言的核心,以及Web浏览器中实现的遗留和标准的DOM。\n由于本书封面上是一只“爪哇犀牛”(封面上印上动物是原书出版公司O'Reilly一贯的风格),读者亲切地称其为“犀牛书”。\n\n此处省略一万字...\n",
"thumb": "/veact-admin/images/profile/article-thumb.jpg",
"thumb": "/images/profile/article-thumb.jpg",
"extends": [],
"meta": { "likes": 51, "views": 11672, "comments": 39 },
"update_at": "2019-07-24T15:53:33.133Z",
Expand Down
6 changes: 3 additions & 3 deletions public/__demo__/mock/article/list.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"_id": "612c81321a53290533a7b782",
"title": "JavaScript 权威指南小结",
"description": "学习总结",
"thumb": "/veact-admin/images/profile/article-thumb.jpg",
"thumb": "/images/profile/article-thumb.jpg",
"extends": [],
"meta": { "likes": 14, "views": 297, "comments": 2 },
"create_at": "2021-08-30T06:56:50.474Z",
Expand Down Expand Up @@ -139,7 +139,7 @@
"_id": "610c29438a907384c63fef00",
"title": "今日日记",
"description": "今天发生的一些事情",
"thumb": "/veact-admin/images/profile/article-thumb.jpg",
"thumb": "/images/profile/article-thumb.jpg",
"extends": [],
"meta": { "likes": 9, "views": 915, "comments": 11 },
"create_at": "2021-08-05T18:09:07.585Z",
Expand Down Expand Up @@ -211,7 +211,7 @@
"_id": "61030f5fcf1faa098ee126b2",
"title": "旅途感想",
"description": "没有整理好的旅途感想",
"thumb": "/veact-admin/images/profile/article-thumb.jpg",
"thumb": "/images/profile/article-thumb.jpg",
"extends": [],
"meta": { "likes": 15, "views": 771, "comments": 9 },
"create_at": "2021-07-29T20:28:15.700Z",
Expand Down
2 changes: 1 addition & 1 deletion public/__demo__/mock/auth/admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Admin",
"slogan": "veact admin system",
"email": "[email protected]",
"avatar": "/veact-admin/images/profile/logo-smooth.png",
"avatar": "/images/profile/logo-smooth.png",
"_id": "589e015d5af07d59124234cc"
}
}
6 changes: 1 addition & 5 deletions vite.config.demo.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import { UserConfig } from 'vite'

const DEMO_BASE_PATH = '/veact-admin/'

export const demoConfiger = (defaultConfig: UserConfig): UserConfig => {
return {
...defaultConfig,
// base path
base: DEMO_BASE_PATH,
plugins: [
...defaultConfig.plugins,
{
Expand All @@ -15,7 +11,7 @@ export const demoConfiger = (defaultConfig: UserConfig): UserConfig => {
return html.replace(
`</head>`,
// append mock entry
`<script src="${DEMO_BASE_PATH}__demo__/index.js"></script></head>`
`<script src="/__demo__/index.js"></script></head>`
)
},
},
Expand Down

0 comments on commit 1a234ba

Please sign in to comment.