Skip to content

Commit 41ecff7

Browse files
committed
Use /ruxr for webpage root path.
1 parent c2242ba commit 41ecff7

File tree

9 files changed

+17
-14
lines changed

9 files changed

+17
-14
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ jobs:
3434
run: |
3535
npm ci
3636
37-
- name: Build with Vue
37+
- name: 🛠️ Build with Vue
3838
run: |
3939
npm run build
4040
41-
- name: Upload artifact
41+
- name: ⬆️ Upload artifact
4242
uses: actions/upload-pages-artifact@v3
4343
with:
44-
path: dist
44+
path: dist/ruxr
4545

4646
deploy:
4747
environment:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"serve": "vue-cli-service serve",
7-
"build": "vue-cli-service build",
7+
"build": "vue-cli-service build --dest=./dist/ruxr",
88
"lint": "vue-cli-service lint"
99
},
1010
"dependencies": {

public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html lang="">
33
<head>
44
<meta charset="utf-8">
5+
<meta base="/ruxr/">
56
<meta http-equiv="X-UA-Compatible" content="IE=edge">
67
<meta name="viewport" content="width=device-width,initial-scale=1.0">
78
<link rel="icon" href="<%= BASE_URL %>favicon.ico">

src/lib/extension.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ export class FullExtensionInfo {
105105
}
106106

107107
getReadmeUrl(): string {
108-
return `/pool/${this.id}/README.md`;
108+
return `/ruxr/pool/${this.id}/README.md`;
109109
}
110110

111111
getLicenseUrl(): string {
112-
return `/pool/${this.id}/LICENSE`;
112+
return `/ruxr/pool/${this.id}/LICENSE`;
113113
}
114114
}
115115

src/lib/fetch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ExtensionCard, FullExtensionInfo } from './extension';
22

3-
const EXTENSIONS_LIST_URL = '/pool/Release.json'
4-
const EXTENSIONS_INFO_URL = '/pool/{id}/rubisco.json'
3+
const EXTENSIONS_LIST_URL = '/ruxr/pool/Release.json'
4+
const EXTENSIONS_INFO_URL = '/ruxr/pool/{id}/rubisco.json'
55

66
export async function fetchExtensions(): Promise<ExtensionCard[]> {
77
const response = await fetch(EXTENSIONS_LIST_URL);

src/router/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ const routes = [
3434
];
3535

3636
const router = createRouter({
37-
history: createWebHashHistory(),
37+
history: createWebHashHistory(
38+
process.env.NODE_ENV === "production" ? "/ruxr" : process.env.BASE_URL
39+
),
3840
routes
3941
});
4042

src/views/CodeOfConduct.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<MarkdownViewer :url="'/CODE_OF_CONDUCT.md'" />
2+
<MarkdownViewer :url="'/ruxr/CODE_OF_CONDUCT.md'" />
33
</template>
44

55
<script lang="ts">

vue.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
transpileDependencies: true,
3+
publicPath: './',
4+
};

vue.config.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)