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
13 changes: 0 additions & 13 deletions website/blog/2019-05-28-first-blog-post.md

This file was deleted.

45 changes: 0 additions & 45 deletions website/blog/2019-05-29-long-blog-post.md

This file was deleted.

25 changes: 0 additions & 25 deletions website/blog/2021-08-01-mdx-blog-post.mdx

This file was deleted.

Binary file not shown.
30 changes: 0 additions & 30 deletions website/blog/2021-08-26-welcome/index.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
slug: 2025-10-28-example
slug: 2025-10-28-welcome
title: Hello Compose World!
authors: [mn]
tags: [hello]
enableComments: false
---

Welcome to the blog
Expand Down
29 changes: 3 additions & 26 deletions website/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,10 @@
yangshun:
name: Yangshun Tay
title: Ex-Meta Staff Engineer, Co-founder GreatFrontEnd
url: https://linkedin.com/in/yangshun
image_url: https://github.com/yangshun.png
page: true
socials:
x: yangshunz
linkedin: yangshun
github: yangshun
newsletter: https://www.greatfrontend.com

slorber:
name: Sébastien Lorber
title: Docusaurus maintainer
url: https://sebastienlorber.com
image_url: https://github.com/slorber.png
page:
# customize the url of the author page at /blog/authors/<permalink>
permalink: '/all-sebastien-lorber-articles'
socials:
x: sebastienlorber
linkedin: sebastienlorber
github: slorber
newsletter: https://thisweekinreact.com

mn:
name: MN
title: Maintainer @ Compose
image_url: https://github.com/maxnorm.png
socials:
x: mnnnnnnnn355
github: maxnorm

mudgen:
name: Nick Mudge
Expand Down
17 changes: 17 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,23 @@ const config = {
contextualSearch: true,
},
}),
// Giscus commenting system configuration
// See here for more information: https://github.com/giscus/giscus
...(process.env.GISCUS_REPO && process.env.GISCUS_REPO_ID && process.env.GISCUS_CATEGORY_ID && {
giscus: {
repo: process.env.GISCUS_REPO,
repoId: process.env.GISCUS_REPO_ID,
category: process.env.GISCUS_CATEGORY || 'Blog',
categoryId: process.env.GISCUS_CATEGORY_ID,
mapping: process.env.GISCUS_MAPPING || 'pathname',
strict: process.env.GISCUS_STRICT || '0',
reactionsEnabled: process.env.GISCUS_REACTIONS_ENABLED || '1',
emitMetadata: process.env.GISCUS_EMIT_METADATA || '0',
inputPosition: process.env.GISCUS_INPUT_POSITION || 'top',
lang: process.env.GISCUS_LANG || 'en',
loading: process.env.GISCUS_LOADING || 'lazy'
},
}),
}),
plugins: [
process.env.POSTHOG_API_KEY && [
Expand Down
71 changes: 69 additions & 2 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@docusaurus/core": "3.9.2",
"@docusaurus/preset-classic": "3.9.2",
"@docusaurus/theme-mermaid": "^3.9.2",
"@giscus/react": "^3.1.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"dotenv": "^17.2.3",
Expand Down
78 changes: 78 additions & 0 deletions website/src/components/Giscus/GiscusComponent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import React from 'react';
import Giscus from "@giscus/react";
import { useColorMode } from '@docusaurus/theme-common';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import styles from './styles.module.css';

/**
* Giscus comment component for blog posts
*
* Configuration is read from themeConfig.giscus in docusaurus.config.js
* The component automatically adapts to the current Docusaurus theme (light/dark mode)
* by using Giscus's built-in themes.
*
* Quick setup: Visit https://giscus.app/ to get your configuration values.
* See GISCUS_SETUP.md for detailed instructions.
*/
export default function GiscusComponent() {
const { colorMode } = useColorMode();
const { siteConfig } = useDocusaurusContext();

const giscusConfig = siteConfig.themeConfig?.giscus;

if (!giscusConfig) {
console.warn(
'Giscus configuration is missing from themeConfig. ' +
'Please ensure giscus config is set in docusaurus.config.js'
);
return null;
}

const {
repo,
repoId,
category = 'Blog',
categoryId,
mapping = 'pathname',
strict = '0',
reactionsEnabled = '1',
emitMetadata = '0',
inputPosition = 'top',
theme: themeConfig,
lightTheme = 'light', // Configurable light theme
darkTheme = 'dark', // Configurable dark theme
lang = 'en',
loading = 'lazy',
...restConfig
} = giscusConfig;


// Determine theme based on color mode and configuration
const theme = colorMode === 'dark' ? darkTheme : lightTheme;

return (
<div className={styles.commentsSection}>
<h2 className={`${styles.commentsHeading} anchor`} id="comments">
Comments
</h2>
<Giscus
key={`giscus-${colorMode}`}
repo={repo}
repoId={repoId}
category={category}
categoryId={categoryId}
mapping={mapping}
strict={strict}
reactionsEnabled={reactionsEnabled}
emitMetadata={emitMetadata}
inputPosition={inputPosition}
theme={theme}
lang={lang}
loading={loading}
crossorigin="anonymous"
async
{...restConfig}
/>
</div>
);
}
1 change: 1 addition & 0 deletions website/src/components/Giscus/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './GiscusComponent';
Loading