CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/pages/features/api.tsx
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Layout } from "antd";
7
8
import { Icon } from "@cocalc/frontend/components/icon";
9
import Content from "components/landing/content";
10
import Footer from "components/landing/footer";
11
import Head from "components/landing/head";
12
import Header from "components/landing/header";
13
import Info from "components/landing/info";
14
import A from "components/misc/A";
15
import { Customize } from "lib/customize";
16
import withCustomize from "lib/with-customize";
17
18
import screenshot from "public/features/api-screenshot.png";
19
20
const title = "API";
21
22
export default function API({ customize }) {
23
const { siteName } = customize;
24
return (
25
<Customize value={customize}>
26
<Head title={title} />
27
<Layout>
28
<Header page="features" subPage="api" />
29
<Layout.Content>
30
<Content
31
landing
32
startup={siteName}
33
title={title}
34
body={<Icon name="api" style={{ fontSize: "60px" }} />}
35
subtitle={
36
<>
37
Programmatically control CoCalc from your own server. Embed
38
CoCalc within other products with a customized external look and
39
feel.
40
</>
41
}
42
image={screenshot}
43
alt={"Using the API"}
44
/>
45
<Info.Heading
46
description={
47
<>
48
The documentation explains what you can do with the CoCalc API.
49
</>
50
}
51
>
52
<A href="https://doc.cocalc.com/api/">CoCalc API Documentation</A>
53
</Info.Heading>
54
</Layout.Content>
55
<Footer />
56
</Layout>
57
</Customize>
58
);
59
}
60
61
export async function getServerSideProps(context) {
62
return await withCustomize({ context });
63
}
64
65