diff --git a/gatsby-config.ts b/gatsby-config.ts
index cc6e06deb..0abd6d8fd 100644
--- a/gatsby-config.ts
+++ b/gatsby-config.ts
@@ -1,8 +1,10 @@
import type { GatsbyConfig } from "gatsby";
const baseId = process.env.AIRTABLE_SCD_BASE_ID;
+const basePath = process.env.BASEPATH
const config: GatsbyConfig = {
+ pathPrefix: basePath,
siteMetadata: {
title: `scd`,
siteUrl: `https://www.yourdomain.tld`
diff --git a/package.json b/package.json
index 482141f75..a79f09ef1 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
"develop": "node --env-file=.env node_modules/.bin/gatsby develop",
"start": "node --env-file=.env node_modules/.bin/gatsby develop",
"build": "node --env-file=.env node_modules/.bin/gatsby build",
- "build-pages": "BASEPATH=/scd gatsby build --prefix-paths",
+ "build-pages": "BASEPATH=/scd node --env-file=.env node_modules/.bin/gatsby build --prefix-paths",
"serve": "gatsby serve",
"clean": "gatsby clean",
"typecheck": "tsc --noEmit"
diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index 497f9f21c..53c2d4ce1 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -12,7 +12,7 @@ const Header = () => {
RPTF/ARSC Sound Collections Database
- About
+ About
Recommend a Collection
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index d50864376..1ffce2b62 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -1,12 +1,16 @@
import * as React from "react"
-import type { HeadFC, PageProps } from "gatsby"
+import { withPrefix, type HeadFC, type PageProps } from "gatsby"
import Layout from "../components/Layout"
import Button from "../components/Button"
const IndexPage: React.FC = () => {
+ const heroStyle = {
+ backgroundImage: `linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(${withPrefix("/images/werd.jpg")})`
+ }
+
return (
-
+
Welcome to the Sound Collections Database!
@@ -16,7 +20,7 @@ const IndexPage: React.FC
= () => {
Use the search box above to search for collections by keyword. You can also click below to browse everything, or to recommend collections for inclusion.
- Browse
+ Browse
Recommend a collection
Image: WERD radio station , AAAMC
diff --git a/src/pages/search.tsx b/src/pages/search.tsx
index f3007c4ee..1a1759d66 100644
--- a/src/pages/search.tsx
+++ b/src/pages/search.tsx
@@ -108,7 +108,7 @@ const SearchPage: React.FC = ({data}) => {
} else {
urlParams.append("sort", val)
}
- history.pushState(null, '', '/search/?' + urlParams.toString());
+ history.pushState(null, '', '?' + urlParams.toString());
}
const handlePageChange = (_event: React.ChangeEvent, page: number) => {
@@ -143,7 +143,7 @@ const SearchPage: React.FC = ({data}) => {
if (newP > 0 && newP <= totalPages) {
setCurrentPage(newP)
// Update search without refreshing the page.
- history.pushState(null, '', '/search/?' + urlParams.toString());
+ history.pushState(null, '', '?' + urlParams.toString());
}
}
return {prev}{startIndex+1} – {endIndex} of {results.length} {next}
diff --git a/src/pages/{markdownRemark.frontmatter__slug}.tsx b/src/pages/{markdownRemark.frontmatter__slug}.tsx
index c25b93a5b..6b2841090 100644
--- a/src/pages/{markdownRemark.frontmatter__slug}.tsx
+++ b/src/pages/{markdownRemark.frontmatter__slug}.tsx
@@ -18,8 +18,10 @@ export default function MdPageTemplate({data}: MdPageTemplateProps) {
const { frontmatter, html } = markdownRemark
return (
- {frontmatter.title}
-
+
+
{frontmatter.title}
+
+
)
}
diff --git a/src/styles/global.css b/src/styles/global.css
index b3f99cdb7..c5be12806 100644
--- a/src/styles/global.css
+++ b/src/styles/global.css
@@ -10,7 +10,4 @@
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
@apply text-base relative pb-32;
}
- .hero {
- background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("/images/werd.jpg");
- }
}
\ No newline at end of file
diff --git a/tailwind.config.js b/tailwind.config.js
index ebf35dfe0..32eaa7e55 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -11,9 +11,6 @@ module.exports = {
},
maxWidth: {
'hlg': '1140px'
- },
- backgroundImage: {
- 'hero-pattern': "url('/images/werd.jpg')",
}
},
},