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
8 changes: 4 additions & 4 deletions app/docs/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ export default async function Page(props: {
{page.title}
</h2>
</div>
page.lastEdited && (

{page.lastEdited && (
<div className="text-sm h-4 mt-1.5 mb-6">
Last edited{" "}
{formatDistance(new Date(), new Date(page.lastEdited))} ago.
</div>
)
)}

<MobileTableOfContents
elements={page.headings}
pageFilePath={page._raw.sourceFilePath}
Expand Down
11 changes: 10 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Inter } from "next/font/google";
import localFont from "next/font/local";
import { ReactNode } from "react";
import { Providers } from "./providers";
import { headers } from "next/headers";

const inter = Inter({
subsets: ["latin"],
Expand All @@ -21,12 +22,20 @@ const calSans = localFont({
variable: "--font-cal-sans",
});

const baseUrl = async () => {
let h = await headers();
const host = h.get("host") ?? "localhost:3000"
const proto = host.includes("localhost") ? "http" : "https"
return `${proto}://${host}`
}


export const metadata: Metadata = {
title: "Apalis - background task and message processing library for Rust",
description:
"Simple, extensible multithreaded background task and message processing library for Rust",
openGraph: {
images: "/images/og.png",
images: `${baseUrl()}/images/og.png`,
}
};

Expand Down
Loading