Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add heading and footer to landing pages #117

Merged
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
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ module.exports = {
'postcss.config.js',
'codegen.ts',
'index-pages.mjs',
'next-sitemap.config.js',
],
parserOptions: {
project: null,
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ yarn-error.log*
/build
/dist
.env.local

# Sitemap
public/sitemap*.xml

10 changes: 10 additions & 0 deletions next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: 'https://plural.sh',
transform: async (_config, path) => ({
loc: path,
changefreq: 'weekly',
priority: 0.5,
lastmod: new Date().toISOString(),
}),
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"scripts": {
"dev": "run-s generate:pageindex dev:watch",
"dev:watch": "concurrently \"next dev\" \"yarn graphql:codegen:watch\"",
"build": "run-s generate:pageindex build:next",
"build": "run-s generate:pageindex build:next postbuild",
"build:next": "next build",
"postbuild": "next-sitemap",
"start": "next start",
"lint": "run-p lint:format lint:js lint:css",
"lint:format": "prettier --check --no-error-on-unmatched-pattern ./{src,pages}/**/*.{js,jsx,ts,tsx,graphql,md,mdpart}",
Expand Down Expand Up @@ -61,6 +62,7 @@
"moment-timezone": "0.5.43",
"next": "13.4.12",
"next-compose-plugins": "2.2.1",
"next-sitemap": "4.2.3",
"next-transpile-modules": "10.0.0",
"octokit": "3.1.0",
"query-string": "8.1.0",
Expand Down
13 changes: 1 addition & 12 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Button, CloseIcon } from '@pluralsh/design-system'
import { type InferGetStaticPropsType } from 'next'
import Link from 'next/link'

import { until } from '@open-draft/until'
import { type Variants, motion } from 'framer-motion'
import styled from 'styled-components'
// @ts-expect-error
Expand All @@ -21,9 +20,6 @@ import { ImpactCardSection } from '@src/components/page-sections/ImpactCardSecti
import { QuoteSection } from '@src/components/page-sections/QuoteSection'
import { HomePageHero } from '@src/components/PageHeros'
import { CenteredSectionHead } from '@src/components/SectionHeads'
import { getTinyRepos } from '@src/data/getRepos'
import { getStacks } from '@src/data/getStacks'
import { getStackTabData } from '@src/data/getStackTabData'
import {
PageHomepageDocument,
type PageHomepageQuery,
Expand Down Expand Up @@ -349,11 +345,6 @@ export const getStaticProps = async () => {
>({
query: PageHomepageDocument,
})
const { data: repos, error: reposError } = await until(() => getTinyRepos())
const { data: stacks, error: stacksError } = await until(() => getStacks())

const buildStackTabs = getStackTabData({ repos, stacks })

const page = data.page_homepage

return propsWithGlobalSettings({
Expand All @@ -362,10 +353,8 @@ export const getStaticProps = async () => {
'Open-source application deployment, faster than ever without sacrificing compliance.',
articleCards: data.page_homepage?.article_cards || null,
quotes: normalizeQuotes(page?.quotes),
featuredQuote: page?.featured_quote || null,
buildStackTabs,
footerVariant: FooterVariant.kitchenSink,
errors: combineErrors([error, stacksError, reposError]),
errors: combineErrors([error]),
})
}

Expand Down
10 changes: 5 additions & 5 deletions pages/kubecon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ export default function KubeCon() {
rel="noopener noreferrer"
target="_blank"
as={Link}
href="/contact-sales"
href="https://calendly.com/sam-plural/30min"
className="mt-medium w-fit"
>
Book a demo
Let's meet in person
</Button>
</div>
</StandardPageWidth>
Expand Down Expand Up @@ -149,9 +149,9 @@ export default function KubeCon() {
rel="noopener noreferrer"
target="_blank"
as={Link}
href="/contact-sales"
href="https://calendly.com/sam-plural/30min"
>
Book a demo
Let's meet in person
</Button>
</div>
<div className="flex flex-col gap-xxxlarge pb-xxxxxxlarge pt-xxxxlarge">
Expand Down Expand Up @@ -248,7 +248,7 @@ export default function KubeCon() {
</StandardPageWidth>
<div className="relative w-full border-y border-fill-two bg-[#171A21]">
<RepeatingLogoSC />
<div className="mx-auto flex w-[75%] flex-col items-center justify-center gap-xsmall py-xxxxxlarge text-center">
<div className="mx-auto flex w-[75%] max-w-[720px] flex-col items-center justify-center gap-xsmall py-xxxxxlarge text-center">
<OverlineLabel>Learn more</OverlineLabel>
<Hero2>About Plural</Hero2>
<Body1 className="mt-xsmall">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ export const getStaticProps = async (context) => {
{
metaTitle: 'Plural',
metaDescription: page.slug,
footerVariant: FooterVariant.none,
hideHeader: true,
footerVariant: FooterVariant.kitchenSink,
components: page.components ?? [],
},
{
revalidate: 20,
revalidate: 60,
}
)
}
Loading
Loading