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
2 changes: 1 addition & 1 deletion .github/workflows/docusaurus-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to GitHub Pages
on:
push:
branches:
- docusaurus-migration
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/docusaurus-test-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: Test deployment

on:
push:
branches:
- docusaurus-migration
pull_request:
branches:
- docusaurus-migration
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
# documentation.

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages
name: Deploy Jekyll site to Pages - Manual (DISABLED - Migrated to Docusaurus)

on:
# Runs on pushes targeting the default branch
# push:
# branches: ["main"]
# DISABLED - This workflow has been replaced by docusaurus-deploy.yml
# To re-enable, uncomment the trigger below
# workflow_dispatch:


# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Temporary: Set to an impossible event to effectively disable
push:
branches: ["never-will-exist-branch-jekyll-gh-pages-disabled"]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
# documentation.

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages
name: Deploy Jekyll site to Pages (DISABLED - Migrated to Docusaurus)

on:
# Runs on pushes targeting the default branch
# DISABLED - This workflow has been replaced by docusaurus-deploy.yml
# To re-enable, uncomment the triggers below
# push:
# branches: ["main"]

# workflow_dispatch:

# Temporary: Set to an impossible branch to effectively disable
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
branches: ["never-will-exist-branch-jekyll-disabled"]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand Down
6 changes: 3 additions & 3 deletions docusaurus/openchoreo/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const config: Config = {
url: 'https://openchoreo.dev',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/openchoreo.github.io/', // TODO: Update this once merged to upstream
baseUrl: '/',
// Set true for GitHub pages deployment.
trailingSlash: true,

Expand Down Expand Up @@ -49,7 +49,7 @@ const config: Config = {
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/openchoreo/openchoreo.github.io/tree/main/',
'https://github.com/openchoreo/openchoreo.github.io/tree/main/docusaurus/openchoreo/',
},
blog: {
showReadingTime: true,
Expand All @@ -60,7 +60,7 @@ const config: Config = {
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/openchoreo/openchoreo.github.io/tree/main/',
'https://github.com/openchoreo/openchoreo.github.io/tree/main/docusaurus/openchoreo/',
// Useful options to enforce blogging best practices
onInlineTags: 'warn',
onInlineAuthors: 'warn',
Expand Down
57 changes: 51 additions & 6 deletions docusaurus/openchoreo/src/components/common/GitHubStars/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,59 @@
import React, {useEffect, useState} from 'react';
import styles from './styles.module.css';

const CACHE_KEY = 'openchoreo_github_stars';

type CacheData = { value: number; timestamp: number };

export default function GitHubStars() {
const [stars, setStars] = useState(null);
const [stars, setStars] = useState<number | null>(null);

useEffect(() => {
fetch('https://api.github.com/repos/openchoreo/openchoreo')
.then(res => res.json())
.then(data => setStars(data.stargazers_count))
.catch(err => console.error('Failed to fetch stars:', err));
const controller = new AbortController();

const getCache = (): CacheData | null => {
try {
const cached = localStorage.getItem(CACHE_KEY);
return cached ? JSON.parse(cached) : null;
} catch {
return null;
}
};

const saveCache = (value: number) => {
try {
localStorage.setItem(CACHE_KEY, JSON.stringify({
value,
timestamp: Date.now()
}));
} catch {
// Ignore localStorage errors
}
};

const cache = getCache();

// If we have ANY cached value, show it immediately
if (cache?.value != null) {
setStars(cache.value);
}

// Fetch fresh data regardless of cache age
fetch('https://api.github.com/repos/openchoreo/openchoreo', {
signal: controller.signal
})
.then(res => res.ok ? res.json() : null)
.then(data => {
if (data?.stargazers_count != null) {
setStars(data.stargazers_count);
saveCache(data.stargazers_count);
}
})
.catch(() => {
// Silent fail - we already showed cached value if available
});

return () => controller.abort();
}, []);

return (
Expand All @@ -22,7 +67,7 @@ export default function GitHubStars() {
<path fillRule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/>
</svg>
{stars !== null && <span className={styles.starCount}>Stars: {stars.toLocaleString()}</span>}
{stars && <span className={styles.starCount}>Stars: {stars.toLocaleString()}</span>}
</a>
);
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/logos/op-Logos-01.webp
Binary file not shown.
Binary file removed img/logos/op-Logos-02.webp
Binary file not shown.
Binary file removed img/logos/op-Logos-03.webp
Binary file not shown.
Binary file removed img/logos/op-Logos-04.webp
Binary file not shown.
Binary file removed img/logos/op-Logos-05.webp
Binary file not shown.
Binary file removed img/logos/op-Logos-06.webp
Binary file not shown.
Binary file removed img/logos/op-Logos-07.webp
Binary file not shown.
Binary file removed img/logos/op-Logos-08.webp
Binary file not shown.
Binary file removed img/logos/op-Logos-09.webp
Binary file not shown.
Binary file removed img/logos/op-Logos-10.webp
Binary file not shown.
Binary file removed img/logos/op-Logos-11.webp
Binary file not shown.
Binary file removed img/logos/op-Logos-12.webp
Binary file not shown.
Binary file removed img/logos/op-Logos-13.webp
Binary file not shown.