Skip to content

Commit

Permalink
Trying to switch to better URL handling
Browse files Browse the repository at this point in the history
  • Loading branch information
njt1982 committed Jun 23, 2024
1 parent c848a55 commit 9125c1b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
- name: Build Sitemap
run: npm run sitemap

- name: 404 handling
run: cp dist/index.html dist/404.html

- name: Install SSH Client
uses: webfactory/[email protected]
with:
Expand Down
6 changes: 3 additions & 3 deletions scripts/sitemap.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ sitemap.pipe(writeStream);

items.map(item =>
sitemap.write({
url: `${BASE_URL}/#/${item.name}`,
changefreq: "daily",
priority: 0.3
url: `${BASE_URL}/${item.name}`,
changefreq: "weekly",
priority: 0.5
})
);

Expand Down
10 changes: 7 additions & 3 deletions src/router/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { createRouter, createWebHashHistory } from "vue-router";
import { createRouter, createWebHistory } from "vue-router";
import McHome from "@/views/McHome.vue";

const router = createRouter({
history: createWebHashHistory(),
history: createWebHistory(),
routes: [
{
path: "/:item_name?",
path: '/',
redirect: { name: 'Home' }
},
{
path: "/minecraft-item-browser/:item_name?",
name: "Home",
component: McHome,
props: true,
Expand Down

0 comments on commit 9125c1b

Please sign in to comment.