Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/components/landing/head.tsx
Views: 687
/*1* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.2* License: MS-RSL – see LICENSE.md for details3*/45import NextHead from "next/head";6import { join } from "path";7import { ReactNode } from "react";89import basePath from "lib/base-path";10import { useCustomize } from "lib/customize";11import IconLogo from "public/logo/icon.svg";1213interface Props {14title: ReactNode;15}1617export default function Head({ title }: Props) {18const { siteName, logoSquareURL } = useCustomize();1920const faviconURL = logoSquareURL21? logoSquareURL22: join(basePath ?? "", IconLogo.src);2324const feedTitle = `${siteName}'s News Feed`;2526// This shows the title if given, otherwise the siteName.27// It used to always show the sitename first, but that's28// mostly useless, the site is clear already from the favicon,29// and other sites like github and amazon do NOT do that.30return (31<NextHead>32<title>{`${title ? title : siteName}`}</title>33<meta34name="description"35content="CoCalc landing pages and documentation"36/>37<link rel="icon" href={faviconURL} />38<link39rel="alternate"40type="application/rss+xml"41href={join(basePath, "/news/rss.xml")}42title={feedTitle}43/>44<link45rel="alternate"46type="application/feed+json"47href={join(basePath, "/news/feed.json")}48title={feedTitle}49/>50<link51rel="alternate"52type="application/atom+xml"53href={join(basePath, "/news/rss.xml")}54title={feedTitle}55/>56</NextHead>57);58}596061