Skip to content
Closed
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
277 changes: 74 additions & 203 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,230 +1,101 @@
import {themes as prismThemes} from "prism-react-renderer"
import type * as Preset from "@docusaurus/preset-classic"
import prismTheme from "./src/theme/CodeBlock/theme"
import type {Config} from "@docusaurus/types"
import {getNavDropdownItemHtml} from "./src/utils"

const title = "Tailcall"
const organization = "tailcallhq"
const project = "tailcallhq.github.io"

export default {
title,
trailingSlash: true,
tagline: "GraphQL platform engineered for scale",
headTags: [
{
tagName: "script",
attributes: {
id: "chatbotscript",
"data-accountid": "CZPG9aVdtk59Tjz4SMTu8w==",
"data-websiteid": "75VGI0NlBqessD4BQn2pFg==",
src: "https://app.robofy.ai/bot/js/common.js?v=" + new Date().getTime(),
},
},
{
tagName: "script",
attributes: {
type: "application/ld+json",
},
innerHTML: JSON.stringify({
"@context": "https://schema.org/",
"@type": "WebSite",
name: "Tailcall",
url: "https://tailcall.run/",
}),
},
],
url: "https://tailcall.run",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",
onBrokenAnchors: "throw",
favicon: "images/favicon.ico",

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: organization, // Usually your GitHub org/user name.
projectName: project, // Usually your repo name.
deploymentBranch: "main", // Branch that GitHub pages will deploy from.

// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
locales: ["en"],
localeConfigs: {
en: {
label: "English",
},
},
},
future: {
experimental_faster: false, // Required for faster production builds. For reference: https://docusaurus.io/blog/releases/3.6#adoption-strategy
},
presets: [
[
"classic",
/** @type {import("@docusaurus/preset-classic").Options} */
{
docs: {
// docRootComponent: require.resolve("./src/components/docs/Layout.tsx"),
sidebarPath: require.resolve("./sidebars.ts"),
showLastUpdateTime: true,
sidebarCollapsible: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: `https://github.com/${organization}/${project}/tree/develop`,
},
blog: false,
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
sitemap: {
changefreq: "weekly",
priority: 0.5,
ignorePatterns: ["/blogs/**"],
},
},
],
],
import { Config } from '@docusaurus/types';

const config: Config = {
title: 'Tailcall',
tagline: 'GraphQL and more',
url: 'https://tailcallhq.github.io',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'tailcallhq',
projectName: 'tailcallhq.github.io',
themeConfig: {
// Replace with your project's social card
image: "icons/companies/tailcall.svg",
algolia: {
appId: "X27WDVHRQ3",
apiKey: "35bc100f239853cd8a7195b23ed7393b",
indexName: "tailcall",
contextualSearch: false,
searchParameters: {
facetFilters: [],
},
},

navbar: {
hideOnScroll: true,
title: 'Tailcall',
logo: {
alt: "My Site Logo",
src: "icons/companies/tailcall.svg",
alt: 'Tailcall Logo',
src: 'img/logo.svg',
},
items: [
{to: "/", label: "Home", position: "left", activeBaseRegex: "^/$"},
// {to: "/about", label: "About", position: "left"},
// {to: "/enterprise", label: "Enterprise", position: "left"},
{to: "/blog", label: "Blog", position: "left"},
{
label: "Developers",
position: "left",
type: 'doc',
docId: 'getting-started',
position: 'left',
label: 'Docs',
},
{ to: '/blog', label: 'Blog', position: 'left' },
{
href: 'https://github.com/tailcallhq/tailcallhq.github.io',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
to: "/docs",
html: getNavDropdownItemHtml("/images/home/book.svg", "Docs Icon", "Docs"),
label: 'Getting Started',
to: '/docs/getting-started',
},
{
label: 'GraphQL',
to: '/docs/graphql',
},
],
},
{
title: 'Community',
items: [
{
to: "/graphql",
html: getNavDropdownItemHtml("/images/home/archive.svg", "Learn Icon", "Learn"),
label: 'Blog',
to: '/blog',
},
{
to: "/releases",
html: getNavDropdownItemHtml("/images/home/git-merge.svg", "Releases Icon", "Releases"),
label: 'GitHub',
href: 'https://github.com/tailcallhq/tailcallhq.github.io',
},
],
},
{
type: "search",
position: "right",
className: "hidden lg:flex search-icon-navbar",
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/tailcallhq/tailcallhq.github.io',
},
{
label: 'Twitter',
href: 'https://twitter.com/tailcallhq',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Tailcall. Built with Docusaurus.`,
},
prism: {
theme: prismTheme,
darkTheme: prismThemes.dracula,
additionalLanguages: ["protobuf", "json", "diff"],
},
colorMode: {
disableSwitch: true,
defaultMode: "light",
respectPrefersColorScheme: false,
},
tableOfContents: {},
} satisfies Preset.ThemeConfig,
plugins: [
},
presets: [
[
"./plugins/custom-blog-plugin.ts",
'@docusaurus/preset-classic',
{
path: "blog",
editLocalizedFiles: false,
blogTitle: "Feed of Tailcall blogs",
blogDescription: "List of blog posts on Tailcall blog",
blogSidebarCount: 10,
blogSidebarTitle: "Recent Blog Posts",
routeBasePath: "blog",
include: ["**/*.{md,mdx}"],
exclude: ["**/_*.{js,jsx,ts,tsx,md,mdx}", "**/_*/**", "**/*.test.{js,jsx,ts,tsx}", "**/__tests__/**"],
postsPerPage: "ALL",
blogListComponent: "@theme/BlogListPage",
blogPostComponent: "@theme/BlogPostPage",
blogTagsListComponent: "@theme/BlogTagsListPage",
blogTagsPostsComponent: "@theme/BlogTagsPostsPage",
rehypePlugins: [],
beforeDefaultRemarkPlugins: [],
beforeDefaultRehypePlugins: [],
truncateMarker: /<!--\s*(truncate)\s*-->/,
showReadingTime: true,
feedOptions: {
type: "all",
copyright: `Copyright © ${new Date().getFullYear()} Tailcall, Inc.`,
docs: {
sidebarPath: require.resolve('./docs/sidebar.ts'),
editUrl: 'https://github.com/tailcallhq/tailcallhq.github.io/edit/main/docs/',
},
onInlineAuthors: "throw",
},
],
[
"@docusaurus/plugin-content-docs",
{
id: "privacy",
path: "privacy",
routeBasePath: "privacy",
showLastUpdateTime: true,
sidebarPath: require.resolve("./privacy/sidebar.ts"),
},
],

[
"@docusaurus/plugin-content-docs",
{
id: "graphql",
path: "graphql",
routeBasePath: "graphql",
showLastUpdateTime: true,
sidebarPath: require.resolve("./graphql/sidebar.ts"),
},
],
[
"@docusaurus/plugin-content-docs",
{
id: "releases",
path: "releases",
routeBasePath: "releases",
showLastUpdateTime: true,
async sidebarItemsGenerator({defaultSidebarItemsGenerator, ...args}: any) {
const sidebarItems = await defaultSidebarItemsGenerator(args)
return sidebarItems.reverse()
blog: {
path: './blog',
editUrl: 'https://github.com/tailcallhq/tailcallhq.github.io/edit/main/blog/',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
async function tailwindPlugin() {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
return {
...postcssOptions,
plugins: [...postcssOptions.plugins, require("tailwindcss"), require("autoprefixer")],
}
},
}
},
],
} satisfies Config
};

export default config;
Loading
Loading