Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shaggy-baths-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@usace-watermanagement/groundwork-water": patch
---

Updating routing in docs by removing leading /#/ can setting base_Url to be "/groundwork-water/" : "/"
7 changes: 6 additions & 1 deletion docs/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ function App() {
}

return (
<div onClick={getNavHelper((url) => doUpdateHash(url))}>
<div
onClick={getNavHelper((url) => {
if (url.includes("/#")) url = url.replace("/#", "");
doUpdateHash(url);
})}
>
<SiteWrapper
fluidNav={true}
links={links}
Expand Down
18 changes: 9 additions & 9 deletions docs/src/pages/docs/forms/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function FormsDocs() {
<Text className="mb-4">
Start with the{" "}
<Link
href={`${BASE_URL}/#/docs/forms/cwms-form`}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will want to keep #/ in so the HREF includes it for copy link / ctrl + click on all instances

href={`${BASE_URL}#/docs/forms/cwms-form`}
className="text-blue-600 hover:underline font-semibold"
>
CWMSForm
Expand All @@ -33,7 +33,7 @@ function FormsDocs() {
<ul className="list-disc ml-6 space-y-2">
<li>
<Link
href={`${BASE_URL}/#/docs/forms/cwms-form`}
href={`${BASE_URL}#/docs/forms/cwms-form`}
className="text-blue-600 hover:underline font-semibold"
>
CWMSForm
Expand All @@ -42,7 +42,7 @@ function FormsDocs() {
</li>
<li>
<Link
href={`${BASE_URL}/#/docs/forms/cwms-input`}
href={`${BASE_URL}#/docs/forms/cwms-input`}
className="text-blue-600 hover:underline font-semibold"
>
CWMSInput
Expand All @@ -51,7 +51,7 @@ function FormsDocs() {
</li>
<li>
<Link
href={`${BASE_URL}/#/docs/forms/cwms-textarea`}
href={`${BASE_URL}#/docs/forms/cwms-textarea`}
className="text-blue-600 hover:underline font-semibold"
>
CWMSTextarea
Expand All @@ -60,7 +60,7 @@ function FormsDocs() {
</li>
<li>
<Link
href={`${BASE_URL}/#/docs/forms/cwms-checkboxes`}
href={`${BASE_URL}#/docs/forms/cwms-checkboxes`}
className="text-blue-600 hover:underline font-semibold"
>
CWMSCheckboxes
Expand All @@ -69,7 +69,7 @@ function FormsDocs() {
</li>
<li>
<Link
href={`${BASE_URL}/#/docs/forms/cwms-radio-group`}
href={`${BASE_URL}#/docs/forms/cwms-radio-group`}
className="text-blue-600 hover:underline font-semibold"
>
CWMSRadioGroup
Expand All @@ -78,7 +78,7 @@ function FormsDocs() {
</li>
<li>
<Link
href={`${BASE_URL}/#/docs/forms/cwms-dropdown`}
href={`${BASE_URL}#/docs/forms/cwms-dropdown`}
className="text-blue-600 hover:underline font-semibold"
>
CWMSDropdown
Expand All @@ -87,7 +87,7 @@ function FormsDocs() {
</li>
<li>
<Link
href={`${BASE_URL}/#/docs/forms/cwms-input-table`}
href={`${BASE_URL}#/docs/forms/cwms-input-table`}
className="text-blue-600 hover:underline font-semibold"
>
CWMSInputTable
Expand All @@ -96,7 +96,7 @@ function FormsDocs() {
</li>
<li>
<Link
href={`${BASE_URL}/#/docs/forms/cwms-spreadsheet`}
href={`${BASE_URL}#/docs/forms/cwms-spreadsheet`}
className="text-blue-600 hover:underline font-semibold"
>
CWMSSpreadsheet
Expand Down
5 changes: 1 addition & 4 deletions docs/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import pkg from "../package.json";
import tailwindcss from "tailwindcss";

export default defineConfig(({ mode }) => {
const base =
mode === "production"
? "https://USACE-WaterManagement.github.io/groundwork-water/"
: "http://localhost:5173/";
const base = mode === "production" ? "/groundwork-water/" : "/";
return {
plugins: [react(), tailwindcss()],
base: base,
Expand Down
5 changes: 1 addition & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ export default defineConfig(({ mode }) => {
};
} else {
console.log("Building Docs App: ", mode);
const base =
mode === "production"
? "https://USACE-WaterManagement.github.io/groundwork-water/"
: "http://localhost:5173/";
const base = mode === "production" ? "/groundwork-water/" : "/";
return {
plugins: [react(), tailwindcss()],
base: base,
Expand Down