Skip to content

Commit

Permalink
[ENG-1322] I Reviewed 1,000s of Opinions on GitHub Copilot (Part 2) (#…
Browse files Browse the repository at this point in the history
…307)

* style docs

* Change blog sidebar title

* swizzle blog sidebar to deemphasize inactive blog post titles

* fix typo

---------

Co-authored-by: konfig-bot <[email protected]>
  • Loading branch information
dphuang2 and konfig-bot authored Oct 23, 2023
1 parent aff9b1b commit 8966305
Show file tree
Hide file tree
Showing 6 changed files with 359 additions and 177 deletions.
1 change: 0 additions & 1 deletion generator/konfig-docs/blog/2023/08/21-serverless.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ description: |
From DHH shunning serverless, Ahrefs saving millions by using a cloud provider
at all, to Amazon raining fire on their own serverless product, serverless has
recently faced significant scrutiny.
and literally hundreds more). One research paper from Berkeley even claimed:
authors: dylan
tags: [Engineering]
image: ./serverless-assets/banner.png
Expand Down
357 changes: 182 additions & 175 deletions generator/konfig-docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,200 +85,207 @@ const beforeRemarkPluginsForPages = [
],
];


/**
* @returns {Promise<import('@docusaurus/types').Config>}
*/
async function createConfig() {
const remarkPlugins = [
(await import('remark-gfm')).default,
[
mermaid,
{
theme: { light: "default", dark: "dark" },
},
],
];
return {
title: "Konfig",
tagline: "Generate SDKs for your REST API",
url: "https://konfigthis.com",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.png",
themes: [
"docusaurus-json-schema-plugin",
const remarkPlugins = [
(await import("remark-gfm")).default,
[
require.resolve("@easyops-cn/docusaurus-search-local"),
mermaid,
{
hashed: true,
indexBlog: false,
docsRouteBasePath: "/",
theme: { light: "default", dark: "dark" },
},
],
"mdx-v2",
],
plugins: [
async function docusaurus(context, options) {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
// Appends TailwindCSS and AutoPrefixer.
postcssOptions.plugins.push(require("tailwindcss"));
postcssOptions.plugins.push(require("autoprefixer"));
return postcssOptions;
];
return {
title: "Konfig",
tagline: "Generate SDKs for your REST API",
url: "https://konfigthis.com",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.png",
themes: [
"docusaurus-json-schema-plugin",
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
hashed: true,
indexBlog: false,
docsRouteBasePath: "/",
},
};
},
],
],
"mdx-v2",
],
plugins: [
async function docusaurus(context, options) {
return {
name: "docusaurus-tailwindcss",
configurePostCss(postcssOptions) {
// Appends TailwindCSS and AutoPrefixer.
postcssOptions.plugins.push(require("tailwindcss"));
postcssOptions.plugins.push(require("autoprefixer"));
return postcssOptions;
},
};
},
],

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
// organizationName: "facebook", // Usually your GitHub org/user name.
// projectName: "docusaurus", // Usually your repo name.
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
// organizationName: "facebook", // Usually your GitHub org/user name.
// projectName: "docusaurus", // Usually your repo name.

// 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"],
},
// 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"],
},

presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
beforeDefaultRemarkPlugins: beforeRemarkPlugins,
remarkPlugins: remarkPlugins,
routeBasePath: "/docs",
sidebarPath: require.resolve("./sidebars.js"),
},
pages: {
beforeDefaultRemarkPlugins: beforeRemarkPluginsForPages,
remarkPlugins: remarkPlugins,
},
theme: {
customCss: [
require.resolve("@code-hike/mdx/styles.css"),
require.resolve("./src/css/custom.css"),
],
},
blog: {
beforeDefaultRemarkPlugins: beforeRemarkPluginsForBlogs,
blogSidebarCount: "ALL",
blogSidebarTitle: "All posts",
remarkPlugins: remarkPlugins,
showReadingTime: true,
blogDescription: "Generate SDKs for your REST API",
truncateMarker: /{\/\* TRUNCATE \*\/}/,
},
gtag: {
trackingID: "G-L2Q9WBQN2D",
anonymizeIP: true,
},
}),
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
docs: {
beforeDefaultRemarkPlugins: beforeRemarkPlugins,
remarkPlugins: remarkPlugins,
routeBasePath: "/docs",
sidebarPath: require.resolve("./sidebars.js"),
},
pages: {
beforeDefaultRemarkPlugins: beforeRemarkPluginsForPages,
remarkPlugins: remarkPlugins,
colorMode: {
defaultMode: "light",
disableSwitch: true,
},
theme: {
customCss: [
require.resolve("@code-hike/mdx/styles.css"),
require.resolve("./src/css/custom.css"),
navbar: {
logo: {
alt: "Konfig Logo",
src: "img/logo-light.png",
href: "https://konfigthis.com",
},
items: [
{
type: "doc",
docId: "intro",
position: "left",
label: "Documentation",
},
{
to: "/interactive-tutorial",
label: "Interactive Tutorial",
position: "left",
},
{ to: "/schedule-demo", label: "Schedule Demo", position: "right" },
{ to: "/blog", label: "Blog", position: "right" },
{ to: "/about", label: "About", position: "right" },
],
},
blog: {
beforeDefaultRemarkPlugins: beforeRemarkPluginsForBlogs,
blogSidebarCount: "ALL",
remarkPlugins: remarkPlugins,
showReadingTime: true,
blogDescription: "Generate SDKs for your REST API",
truncateMarker: /{\/\* TRUNCATE \*\/}/,
api: {
authPersistance: "localStorage",
serverVariablesPersistance: "localStorage",
},
gtag: {
trackingID: "G-L2Q9WBQN2D",
anonymizeIP: true,
footer: {
style: "light",
links: [
{
title: "Links",
items: [
{
label: "Website",
to: "https://konfigthis.com",
},
{
label: "LinkedIn",
to: "https://www.linkedin.com/company/konfig",
},
{
label: "Blog",
to: "/blog",
},
],
},
// {
// title: "Docs",
// items: [
// {
// label: "Introduction",
// to: "/docs/intro",
// },
// ],
// },
// {
// title: "Community",
// items: [
// {
// label: "Stack Overflow",
// href: "https://stackoverflow.com/questions/tagged/docusaurus",
// },
// {
// label: "Discord",
// href: "https://discordapp.com/invite/docusaurus",
// },
// {
// label: "Twitter",
// href: "https://twitter.com/docusaurus",
// },
// ],
// },
// {
// title: "More",
// items: [
// {
// label: "Blog",
// to: "/blog",
// },
// {
// label: "GitHub",
// href: "https://github.com/facebook/docusaurus",
// },
// ],
// },
],
copyright: `Copyright © ${new Date().getFullYear()} Konfig, Inc.`,
},
}),
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: "Konfig",
logo: {
alt: "Konfig Logo",
src: "img/favicon.png",
href: "https://konfigthis.com",
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ["ruby", "csharp", "php"],
},
items: [
{
type: "doc",
docId: "intro",
position: "left",
label: "Documentation",
},
{
to: "/interactive-tutorial",
label: "Interactive Tutorial",
position: "left",
},
{ to: "/schedule-demo", label: "Schedule Demo", position: "right" },
{ to: "/blog", label: "Blog", position: "right" },
{ to: "/about", label: "About", position: "right" },
],
},
api: {
authPersistance: "localStorage",
serverVariablesPersistance: "localStorage",
},
footer: {
style: "light",
links: [
{
title: "Links",
items: [
{
label: "Website",
to: "https://konfigthis.com",
},
{
label: "LinkedIn",
to: "https://www.linkedin.com/company/konfig",
},
],
},
// {
// title: "Docs",
// items: [
// {
// label: "Introduction",
// to: "/docs/intro",
// },
// ],
// },
// {
// title: "Community",
// items: [
// {
// label: "Stack Overflow",
// href: "https://stackoverflow.com/questions/tagged/docusaurus",
// },
// {
// label: "Discord",
// href: "https://discordapp.com/invite/docusaurus",
// },
// {
// label: "Twitter",
// href: "https://twitter.com/docusaurus",
// },
// ],
// },
// {
// title: "More",
// items: [
// {
// label: "Blog",
// to: "/blog",
// },
// {
// label: "GitHub",
// href: "https://github.com/facebook/docusaurus",
// },
// ],
// },
],
copyright: `Copyright © ${new Date().getFullYear()} Konfig, Inc.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ["ruby", "csharp", "php"],
},
}),
}),
};
}
};

module.exports = createConfig;
Loading

0 comments on commit 8966305

Please sign in to comment.