Skip to content

Commit

Permalink
修改为相对路径
Browse files Browse the repository at this point in the history
  • Loading branch information
2234839 committed Dec 20, 2023
1 parent f6eb857 commit 2243a95
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions apps/frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/ocean_press-log" />
<link rel="icon" type="image/svg+xml" href="./ocean_press-log" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OceanPress</title>
<meta name="description" content="这是一款从思源笔记本 生成一个静态站点的工具" />
Expand All @@ -12,7 +12,7 @@

<body>
<div id="app"></div>
<script type="module" src="/src/webpage.ts"></script>
<script type="module" src="./src/webpage.ts"></script>
</body>
<style>
#app {
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ const defaultConfig = {
cdn: {
/** 思源 js、css等文件的前缀 */
siyuanPrefix:
'https://fastly.jsdelivr.net/gh/siyuan-note/oceanpress@main/apps/frontend/public/notebook/',
'https://fastly.jsdelivr.net/gh/siyuan-note/oceanpress@latest/apps/frontend/public/notebook/',
/** 思源 js、css等文件zip包地址 */
publicZip:
'https://fastly.jsdelivr.net/gh/siyuan-note/oceanpress@main/apps/frontend/public/public.zip',
'https://fastly.jsdelivr.net/gh/siyuan-note/oceanpress@latest/apps/frontend/public/public.zip',
},
/** html模板嵌入代码块,会将此处配置中的代码嵌入到生成的html所对应的位置 */
embedCode: {
Expand Down
13 changes: 7 additions & 6 deletions apps/frontend/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vueJSX from "@vitejs/plugin-vue-jsx";
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJSX from '@vitejs/plugin-vue-jsx'
export default defineConfig({
plugins: [vue(), vueJSX()],
build: {
outDir: "./dist/",
outDir: './dist/',
emptyOutDir: true,
},
resolve: {
alias: {
"@": "/src",
'@': '/src',
},
},
server: {
port: 8080,
},
});
base: './',
})

0 comments on commit 2243a95

Please sign in to comment.