fix canonical urls
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
||||
NEXT_PUBLIC_API_URL=https://api.dev.sahkoinsinoorikilta.fi/api
|
||||
SITE_URL=https://dev.sahkoinsinoorikilta.fi
|
||||
NEXT_PUBLIC_SITE_URL=https://dev.sahkoinsinoorikilta.fi
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
NEXT_PUBLIC_API_URL=https://api.sahkoinsinoorikilta.fi/api
|
||||
SITE_URL=https://sahkoinsinoorikilta.fi
|
||||
NEXT_PUBLIC_SITE_URL=https://sahkoinsinoorikilta.fi
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
NEXT_PUBLIC_API_URL=https://api.dev.sahkoinsinoorikilta.fi/api
|
||||
SITE_URL=https://dev.sahkoinsinoorikilta.fi
|
||||
NEXT_PUBLIC_SITE_URL=https://dev.sahkoinsinoorikilta.fi
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ COPY types types/
|
||||
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV NEXT_PUBLIC_API_URL=https://api.dev.sahkoinsinoorikilta.fi/api
|
||||
ENV SITE_URL=https://dev.sahkoinsinoorikilta.fi
|
||||
ENV NEXT_PUBLIC_SITE_URL=https://dev.sahkoinsinoorikilta.fi
|
||||
RUN npm run build
|
||||
|
||||
FROM node:14-alpine as server
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ COPY types types/
|
||||
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV NEXT_PUBLIC_API_URL=https://api.sahkoinsinoorikilta.fi/api
|
||||
ENV SITE_URL=https://sahkoinsinoorikilta.fi
|
||||
ENV NEXT_PUBLIC_SITE_URL=https://sahkoinsinoorikilta.fi
|
||||
RUN npm run build
|
||||
|
||||
FROM node:14-alpine as server
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
siteUrl: process.env.SITE_URL || "https://sahkoinsinoorikilta.fi",
|
||||
siteUrl: process.env.NEXT_PUBLIC_SITE_URL || "https://sahkoinsinoorikilta.fi",
|
||||
generateRobotsTxt: true,
|
||||
exclude: ["/events/*", "/feed/*", "/signup/*", "/admin/*"]
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import AdminPageWrapper from "@views/common/AdminPageWrapper";
|
||||
const AdminFrontPage: NextPage = () => (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/admin`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/admin`} />
|
||||
</Head>
|
||||
<AdminPageWrapper requiresAuthentication>
|
||||
<div data-e2e="admin-front-page">
|
||||
|
||||
@@ -25,7 +25,7 @@ const EventPage: NextPage<InitialProps> = ({ initialEvent }) => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/events/${id}`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/events/${id}`} />
|
||||
</Head>
|
||||
<PageWrapper>
|
||||
<EventPageView event={data as Event} />
|
||||
|
||||
@@ -25,7 +25,7 @@ const FeedPage: NextPage<InitialProps> = ({ initialPost }) => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/feed/${id}`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/feed/${id}`} />
|
||||
</Head>
|
||||
<PageWrapper>
|
||||
<FeedPageView post={data} />
|
||||
|
||||
@@ -27,7 +27,7 @@ const InEnglishPage: NextPage<InitialProps> = ({ initialEvents, initialFeed }) =
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/in_english`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/in_english`} />
|
||||
</Head>
|
||||
<PageWrapper>
|
||||
<InEnglishPageView events={eventResult.data as Event[]} feed={feedResult.data} />
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ const FrontPage: NextPage<InitialProps> = ({ initialEvents, initialFeed }) => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/`} />
|
||||
</Head>
|
||||
<PageWrapper>
|
||||
<FrontPageView events={eventResult.data as Event[]} feed={feedResult.data} />
|
||||
|
||||
@@ -7,7 +7,7 @@ import PageWrapper from "@views/common/PageWrapper";
|
||||
const FreshmenPage: NextPage = () => (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/kilta/fuksi`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/kilta/fuksi`} />
|
||||
</Head>
|
||||
<PageWrapper>
|
||||
<FreshmenPageView />
|
||||
|
||||
@@ -7,7 +7,7 @@ import PageWrapper from "@views/common/PageWrapper";
|
||||
const GuildPage: NextPage = () => (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/kilta`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/kilta`} />
|
||||
</Head>
|
||||
<PageWrapper>
|
||||
<GuildPageView />
|
||||
|
||||
@@ -7,7 +7,7 @@ import PageWrapper from "@views/common/PageWrapper";
|
||||
const HonoraryPage: NextPage = () => (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/kilta/kunnia`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/kilta/kunnia`} />
|
||||
</Head>
|
||||
<PageWrapper>
|
||||
<HonoraryPageView />
|
||||
|
||||
@@ -26,7 +26,7 @@ const ActualPage: NextPage<InitialProps> = ({ initialEvents, initialFeed }) => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/kilta/toiminta`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/kilta/toiminta`} />
|
||||
</Head>
|
||||
<PageWrapper>
|
||||
<ActualPageView events={eventResult.data} feed={feedResult.data} />
|
||||
|
||||
@@ -7,7 +7,7 @@ import PageWrapper from "@views/common/PageWrapper";
|
||||
const StudiesPage: NextPage = () => (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/opinnot_ja_ura`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/opinnot_ja_ura`} />
|
||||
</Head>
|
||||
<PageWrapper>
|
||||
<StudiesPageView />
|
||||
|
||||
@@ -40,7 +40,7 @@ const SignUpPage: NextPage<InitialProps> = ({ form }) => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/signup/${form.id}`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/signup/${form.id}`} />
|
||||
</Head>
|
||||
<PageWrapper>
|
||||
<SignUpPageView
|
||||
|
||||
@@ -7,7 +7,7 @@ import PageWrapper from "@views/common/PageWrapper";
|
||||
const ContactsPage: NextPage = () => (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/yhteystiedot`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/yhteystiedot`} />
|
||||
</Head>
|
||||
<PageWrapper>
|
||||
<ContactsPageView />
|
||||
|
||||
@@ -17,7 +17,7 @@ const CorporatePage: NextPage<InitialProps> = ({ initialJobAds }) => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<link rel="canonical" href={`${process.env.SITE_URL}/yritysyhteistyo`} />
|
||||
<link rel="canonical" href={`${process.env.NEXT_PUBLIC_SITE_URL}/yritysyhteistyo`} />
|
||||
</Head>
|
||||
<PageWrapper>
|
||||
<CorporatePageView jobAds={data as JobAd[]} />
|
||||
|
||||
@@ -4,7 +4,7 @@ import axios from "axios";
|
||||
|
||||
const API_URL = "https://api.dev.sahkoinsinoorikilta.fi/api";
|
||||
|
||||
export const getSiteRoot = (): string => process.env.SITE_URL || "http://localhost:3000";
|
||||
export const getSiteRoot = (): string => process.env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000";
|
||||
export const getPageUrl = ClientFunction(() => window.location.pathname);
|
||||
|
||||
export const getPostRequestLogger = (url: string) => RequestLogger({ url: `${API_URL}/${url}`, method: "post" }, {
|
||||
|
||||
Reference in New Issue
Block a user