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
19 changes: 19 additions & 0 deletions functions/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
interface Env {
ASSETS: {
fetch(request: Request): Promise<Response>;
};
}

export const onRequest: PagesFunction<Env> = async (context) => {
if (context.request.method !== "GET" && context.request.method !== "HEAD") {
return new Response(null, {
status: 405,
headers: { Allow: "GET, HEAD" },
});
}

const url = new URL(context.request.url);
url.pathname = "/home/";

return context.env.ASSETS.fetch(new Request(url, context.request));
};
5 changes: 5 additions & 0 deletions public/_routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": 1,
"include": ["/", "/api/contact"],
"exclude": []
}
4 changes: 3 additions & 1 deletion src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ interface LayoutProps {
image?: string;
twitterCardType?: string;
schema?: Record<string, unknown> | Record<string, unknown>[];
canonicalPath?: string;
}

const {
Expand All @@ -13,10 +14,11 @@ const {
image,
twitterCardType = "summary",
schema,
canonicalPath,
} = Astro.props as LayoutProps;

const socialImageUrl = image ? new URL(image, Astro.site) : null;
const canonicalUrl = Astro.site ? new URL(Astro.url.pathname, Astro.site) : null;
const canonicalUrl = Astro.site ? new URL(canonicalPath ?? Astro.url.pathname, Astro.site) : null;
const siteDescription = "Operately helps teams run goals, projects, and weekly execution with built-in workflows. Use Operately Cloud or self-host it in minutes.";
const siteSchema = canonicalUrl
? [
Expand Down
85 changes: 85 additions & 0 deletions src/pages/_index/HomePage.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
import BaseLayout from "../../layouts/BaseLayout.astro";

const pageTitle = "Operately: Open Source Goal & Project Management for Startups";
const pageDescription =
"Operately helps teams run goals, projects, and weekly execution with built-in workflows. Use Operately Cloud or self-host it in minutes.";

import Hero from "./Hero.astro";
import Intro from "./Intro.astro";
import Goals from "./Goals.astro";
import Projects from "./Projects.astro";
import Alfred from "./Alfred.astro";
import Security from "../_features/Security.astro";
import CTA from "../_features/CTA.astro";

import { getLatestRelease } from "../../utils/releases";

const latestRelease = await getLatestRelease();

const schema = [
{
"@context": "https://schema.org",
"@type": "Organization",
"@id": "https://operately.com/#organization",
name: "Operately",
url: "https://operately.com/",
logo: "https://operately.com/favicon.svg",
sameAs: [
"https://github.com/operately/operately",
"https://www.linkedin.com/company/92810497/",
"https://x.com/operately",
"https://www.youtube.com/@operately",
],
},
{
"@context": "https://schema.org",
"@type": "WebSite",
"@id": "https://operately.com/#website",
name: "Operately",
url: "https://operately.com/",
description: pageDescription,
publisher: {
"@id": "https://operately.com/#organization",
},
},
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"@id": "https://operately.com/#software",
name: "Operately",
applicationCategory: "BusinessApplication",
operatingSystem: "Web",
url: "https://operately.com/",
description: pageDescription,
image: "https://operately.com/images/social/card-summary-large.png",
publisher: {
"@id": "https://operately.com/#organization",
},
offers: {
"@type": "Offer",
price: "0",
priceCurrency: "USD",
},
},
];
---

<BaseLayout
title={pageTitle}
description={pageDescription}
image={"/images/social/card-summary-large.png"}
twitterCardType="summary_large_image"
schema={schema}
canonicalPath="/"
>
<main>
<Hero latestRelease={latestRelease} />
<Intro />
<Goals />
<Projects />
<Alfred />
<Security />
<CTA />
</main>
</BaseLayout>
5 changes: 5 additions & 0 deletions src/pages/home.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
import HomePage from "./_index/HomePage.astro";
---

<HomePage />
83 changes: 2 additions & 81 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,84 +1,5 @@
---
import BaseLayout from "../layouts/BaseLayout.astro";

const pageTitle = "Operately: Open Source Goal & Project Management for Startups";
const pageDescription =
"Operately helps teams run goals, projects, and weekly execution with built-in workflows. Use Operately Cloud or self-host it in minutes.";

import Hero from "./_index/Hero.astro";
import Intro from "./_index/Intro.astro";
import Goals from "./_index/Goals.astro";
import Projects from "./_index/Projects.astro";
import Alfred from "./_index/Alfred.astro";
import Security from "./_features/Security.astro";
import CTA from "./_features/CTA.astro";

import { getLatestRelease } from "../utils/releases";

const latestRelease = await getLatestRelease();

const schema = [
{
"@context": "https://schema.org",
"@type": "Organization",
"@id": "https://operately.com/#organization",
name: "Operately",
url: "https://operately.com/",
logo: "https://operately.com/favicon.svg",
sameAs: [
"https://github.com/operately/operately",
"https://www.linkedin.com/company/92810497/",
"https://x.com/operately",
"https://www.youtube.com/@operately",
],
},
{
"@context": "https://schema.org",
"@type": "WebSite",
"@id": "https://operately.com/#website",
name: "Operately",
url: "https://operately.com/",
description: pageDescription,
publisher: {
"@id": "https://operately.com/#organization",
},
},
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"@id": "https://operately.com/#software",
name: "Operately",
applicationCategory: "BusinessApplication",
operatingSystem: "Web",
url: "https://operately.com/",
description: pageDescription,
image: "https://operately.com/images/social/card-summary-large.png",
publisher: {
"@id": "https://operately.com/#organization",
},
offers: {
"@type": "Offer",
price: "0",
priceCurrency: "USD",
},
},
];
import HomePage from "./_index/HomePage.astro";
---

<BaseLayout
title={pageTitle}
description={pageDescription}
image={"/images/social/card-summary-large.png"}
twitterCardType="summary_large_image"
schema={schema}
>
<main>
<Hero latestRelease={latestRelease} />
<Intro />
<Goals />
<Projects />
<Alfred />
<Security />
<CTA />
</main>
</BaseLayout>
<HomePage />