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

[demo ] static output #16

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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 next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const nextConfig = {
fullUrl: true,
},
},
output: "export",
images: {
remotePatterns: [{ hostname: "assets.basehub.com" }, { hostname: "basehub.earth" }],
},
Expand Down
33 changes: 22 additions & 11 deletions public/sitemap-0.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://nextjs-marketing-website.basehub.com/changelog</loc><lastmod>2024-10-25T00:46:38.426Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/blog</loc><lastmod>2024-10-25T00:46:38.427Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com</loc><lastmod>2024-10-25T00:46:38.427Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/features/realtime-insights</loc><lastmod>2024-10-25T00:46:38.427Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/pricing</loc><lastmod>2024-10-25T00:46:38.427Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/blog/how-to-generate-scylla-invites</loc><lastmod>2024-10-25T00:46:38.427Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/blog/hwid-virtualizer-setup-tutorial</loc><lastmod>2024-10-25T00:46:38.427Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/blog/valorant-internal-setup-tutorial</loc><lastmod>2024-10-25T00:46:38.427Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/changelog/improved-stability-and-cheat-features</loc><lastmod>2024-10-25T00:46:38.427Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/changelog/todo</loc><lastmod>2024-10-25T00:46:38.427Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/changelog/todo-7js6wPUkg6ppknn_1FTGI</loc><lastmod>2024-10-25T00:46:38.427Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/changelog</loc><lastmod>2024-11-24T12:22:00.274Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/request-demo</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/changelog/rss.xml</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/sign-in</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/sign-up</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/blog/rss.xml</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/blog</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/features/collaborative-task-boards</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/features/realtime-insights</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/pricing</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/privacy-policy</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/terms</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/blog/from-concept-to-launch-how-acme-helps-teams-deliver-faster</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/blog/increasing-productivity-tips-for-using-acmes-advanced-features</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/blog/maximizing-team-collaboration-with-threaded-conversations</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/blog/the-power-of-agile-project-management-with-acme</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/blog/the-role-of-effective-communication-in-building-and-shipping-products-quickly</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/blog/why-simple-messaging-tools-are-crucial-for-agile-development</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/changelog/improved-search-functionality</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/changelog/integrated-file-sharing-update</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://nextjs-marketing-website.basehub.com/changelog/new-customizable-notifications</loc><lastmod>2024-11-24T12:22:00.275Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
</urlset>
2 changes: 0 additions & 2 deletions src/app/(auth)/_components/auth-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ export async function AuthLayout({
},
},
]) => {
"use server";

return (
<Image
priority
Expand Down
2 changes: 2 additions & 0 deletions src/app/(auth)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export const dynamic = "force-static";

export default function Layout({ children }: { children: React.ReactNode }) {
return (
<div className="flex min-h-[calc(100svh-var(--header-height))] flex-col justify-center">
Expand Down
2 changes: 0 additions & 2 deletions src/app/(auth)/request-demo/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export default function RequestDemo() {
]}
>
{async ([{ site }]) => {
"use server";

return (
<AuthLayout
subtitle={
Expand Down
2 changes: 0 additions & 2 deletions src/app/(auth)/sign-in/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export default function SignIn() {
]}
>
{async ([{ site }]) => {
"use server";

return (
<AuthLayout
subtitle={
Expand Down
2 changes: 0 additions & 2 deletions src/app/(auth)/sign-up/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ export default function SignUp() {
]}
>
{async ([{ site }]) => {
"use server";

return (
<AuthLayout
subtitle={
Expand Down
2 changes: 0 additions & 2 deletions src/app/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@ export default async function DynamicPage({
site: { pages },
},
]) => {
"use server";

const page = pages.items[0];

if (!page) notFound();
Expand Down
2 changes: 0 additions & 2 deletions src/app/_components/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ export async function Footer() {
site: { footer, settings },
},
]) => {
"use server";

return (
<footer className="border-t border-border py-16 dark:border-dark-border">
<div className="container mx-auto grid grid-cols-2 grid-rows-[auto_auto_auto] place-items-start items-center gap-y-7 px-6 sm:grid-cols-[1fr_auto_1fr] sm:grid-rows-2 sm:gap-x-3 sm:gap-y-16">
Expand Down
2 changes: 0 additions & 2 deletions src/app/_components/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ export async function Header() {
site: { header, settings },
},
]) => {
"use server";

return (
<header className="sticky left-0 top-0 z-[100] flex w-full flex-col border-b border-border bg-surface-primary dark:border-dark-border dark:bg-dark-surface-primary">
<div className="flex h-[--header-height] bg-surface-primary dark:bg-dark-surface-primary">
Expand Down
2 changes: 0 additions & 2 deletions src/app/_sections/features/hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ export default function FeatureHero({ heading, heroLayout, image, actions }: Fea
]}
>
{async ([{ site }]) => {
"use server";

return (
<BaseHubImage
priority
Expand Down
2 changes: 0 additions & 2 deletions src/app/_sections/newsletter/newsletter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ export function Newsletter() {
]}
>
{async ([{ site }]) => {
"use server";

return (
<Section
className="bg-surface-secondary !py-10 dark:bg-dark-surface-secondary"
Expand Down
1 change: 0 additions & 1 deletion src/app/blog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ export default async function BlogPage({ params: _params }: { params: Promise<{
},
},
]) => {
"use server";
const blogpost = posts.items.at(0);

if (!blogpost) return notFound();
Expand Down
1 change: 0 additions & 1 deletion src/app/blog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export default async function BlogPage() {
collections: { authors },
},
]) => {
"use server";
const { posts } = blog;

if (posts.items.length === 0) {
Expand Down
2 changes: 2 additions & 0 deletions src/app/blog/rss.xml/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { basehub } from "basehub";
import { siteUrl } from "@/../next-sitemap.config";

export const dynamic = "force-static";

export async function GET() {
const data = await basehub().query({
site: {
Expand Down
1 change: 0 additions & 1 deletion src/app/changelog/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ export default async function ChangelogPage({ params: _params }: ChangelogPagePa
},
allPosts,
]) => {
"use server";
const post = changelog.posts.items.at(0);

if (!post) return notFound();
Expand Down
1 change: 0 additions & 1 deletion src/app/changelog/_components/changelog-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export function ChangelogLayout({
site: { changelog },
},
]) => {
"use server";
const socialLinks = changelog.socialLinks;

return (
Expand Down
2 changes: 0 additions & 2 deletions src/app/changelog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ export default async function ChangelogPage() {
site: { changelog },
},
]) => {
"use server";

if (changelog.posts.items.length === 0) {
return notFound();
}
Expand Down
2 changes: 2 additions & 0 deletions src/app/changelog/rss.xml/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { basehub } from "basehub";
import { siteUrl } from "@/../next-sitemap.config";

export const dynamic = "force-static";

export async function GET() {
const data = await basehub().query({
site: {
Expand Down
7 changes: 3 additions & 4 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ import { ButtonLink } from "@/common/button";
import { Heading } from "@/common/heading";
import { Section } from "@/common/layout";

export const dynamic = "force-static";

export default function NotFound() {
return (
<Section className="flex h-[calc(100vh-var(--header-height))] flex-col justify-center">
<Heading
subtitle="The page you're trying to access does not exist."
tag="404"
>
<Heading subtitle="The page you're trying to access does not exist." tag="404">
<h2>Page not found</h2>
</Heading>
<ButtonLink href="/" intent="primary">
Expand Down
3 changes: 0 additions & 3 deletions src/app/providers.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { ThemeProvider } from "next-themes";
import { Toolbar } from "basehub/next-toolbar";

import { BaseHubThemeProvider } from "@/context/basehub-theme-provider";
import { TooltipProvider } from "@/common/tooltip";

export function Providers({ children }: { children: React.ReactNode }) {
return (
<ThemeProvider enableSystem attribute="class" defaultTheme="system">
<Toolbar />
<BaseHubThemeProvider />
<TooltipProvider>{children}</TooltipProvider>
</ThemeProvider>
Expand Down
1 change: 0 additions & 1 deletion src/context/basehub-theme-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export function BaseHubThemeProvider() {
return (
<Pump queries={[{ site: { settings: { theme: themeFragment } } }]}>
{async ([data]) => {
"use server";
const accent = colors[data.site.settings.theme.accent];
const grayScale = colors[data.site.settings.theme.grayScale];

Expand Down