Skip to content

Commit

Permalink
Reset attempts to fix routing with GH Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
macareonie committed Jun 27, 2024
1 parent e240ca3 commit 56e3680
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 61 deletions.
19 changes: 0 additions & 19 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,6 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>

<script type="text/javascript">
(function (l) {
if (l.search[1] === "/") {
var decoded = l.search
.slice(1)
.split("&")
.map(function (s) {
return s.replace(/~and~/g, "&");
})
.join("?");
window.history.replaceState(
null,
null,
l.pathname.slice(0, -1) + decoded + l.hash
);
}
})(window.location);
</script>
</head>
<body>
<div id="root"></div>
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"homepage": "https://macareonie.github.io/me/",
"name": "personal-website",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"predeploy": "npm run build",
"deploy": "gh-pages -d dist",
"dev": "vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
Expand Down
32 changes: 0 additions & 32 deletions public/404.html

This file was deleted.

7 changes: 4 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ function App() {
<Router>
<NavBar />
<Routes>
<Route exact path="/" element={<Home />} />
<Route exact path="/about" element={<About />} />
<Route exact path="/foodblog" element={<FoodBlog />} />
<Route exact path="/me/" element={<Home />} />
<Route exact path="/me/about" element={<About />} />
<Route exact path="/me/foodblog" element={<FoodBlog />} />
<Route exact path="*" element={<div>Page Not Found</div>} />
</Routes>
</Router>
<Footer />
Expand Down
6 changes: 3 additions & 3 deletions src/components/header/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
import { Bars3Icon, BellIcon, XMarkIcon } from "@heroicons/react/24/outline";

const navigation = [
{ name: "Home", href: "/", current: true },
{ name: "About Me", href: "/about", current: false },
{ name: "Food Blog", href: "/foodblog", current: false },
{ name: "Home", href: "/me/", current: true },
{ name: "About Me", href: "/me/about", current: false },
{ name: "Food Blog", href: "/me/foodblog", current: false },
];

function classNames(...classes) {
Expand Down

0 comments on commit 56e3680

Please sign in to comment.