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
51 changes: 25 additions & 26 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const config: Config = {
docs: {
id: 'default',
path: 'docs',
routeBasePath: 'docs',
routeBasePath: '/',
sidebarPath: './sidebars.ts',
editUrl: 'https://github.com/universal-tool-calling-protocol/utcp-specification/tree/main/',
showLastUpdateTime: true,
Expand Down Expand Up @@ -82,6 +82,10 @@ const config: Config = {
'@docusaurus/plugin-client-redirects',
{
redirects: [
{
to: '/',
from: '/docs',
},
{
to: '/about/RFC',
from: '/RFC',
Expand Down Expand Up @@ -111,7 +115,6 @@ const config: Config = {
// Replace with your project's social card
image: 'img/black-logo-square.png',
navbar: {
title: 'UTCP',
logo: {
alt: 'UTCP Logo',
src: 'img/black-logo-square.svg',
Expand All @@ -130,27 +133,23 @@ const config: Config = {
label: 'Tool Registry',
},
{
type: 'dropdown',
label: 'more',
type: 'doc',
docId: 'RFC',
label: 'RFC',
position: 'left',
docsPluginId: 'about',
},
{
type: 'doc',
docId: 'about-us',
label: 'About Us',
position: 'left',
docsPluginId: 'about',
},
{
label: 'Blog',
to: '/blog',
position: 'left',
items: [
{
type: 'doc',
docId: 'RFC',
label: 'RFC',
docsPluginId: 'about',
},
{
type: 'doc',
docId: 'about-us',
label: 'About Us',
docsPluginId: 'about',
},
{
label: 'Blog',
to: '/blog',
},
],
},
{
type: 'docsVersionDropdown',
Expand All @@ -177,19 +176,19 @@ const config: Config = {
items: [
{
label: 'Overview',
to: '/docs',
to: '/',
},
{
label: 'Provider Types',
to: '/docs/providers/http',
to: '/providers/http',
},
{
label: 'Implementation Guide',
to: '/docs/implementation',
to: '/implementation',
},
{
label: 'UTCP vs MCP',
to: '/docs/utcp-vs-mcp',
to: '/utcp-vs-mcp',
},
],
},
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/pages/index.tsx → src/pages/index.tsx.backup
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import clsx from 'clsx';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import HomepageFeatures from '@site/src/components/HomepageFeatures.backup';
import Heading from '@theme/Heading';

import styles from './index.module.css';
import styles from './index.module.css.backup';

function GitHubFollowersButton() {
const [followerCount, setFollowerCount] = useState<number>(450); // Default fallback based on current count
Expand Down
26 changes: 3 additions & 23 deletions src/theme/NavbarItem/CustomGithubNavbarItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { useLocation } from '@docusaurus/router';
import GitHubButton from '../../components/GitHubButton';

interface CustomGithubNavbarItemProps {
Expand All @@ -22,10 +21,7 @@ const GitHubIcon: React.FC<{ className?: string }> = ({ className = "" }) => (
);

const CustomGithubNavbarItem: React.FC<CustomGithubNavbarItemProps> = ({ mobile, ...props }) => {
const location = useLocation();
const isBlogPage = location.pathname.startsWith('/blog');

// For mobile view, always show simple version with icon
// For mobile view, show simple version with icon
if (mobile) {
return (
<a
Expand All @@ -41,24 +37,8 @@ const CustomGithubNavbarItem: React.FC<CustomGithubNavbarItemProps> = ({ mobile,
);
}

// Show fancy button only on blog pages, normal link elsewhere
if (isBlogPage) {
return <GitHubButton />;
}

// Normal GitHub link for non-blog pages with icon
return (
<a
href="https://github.com/universal-tool-calling-protocol"
target="_blank"
rel="noopener noreferrer"
className="navbar__item navbar__link"
title="GitHub"
{...props}
>
<GitHubIcon />
</a>
);
// Always show the fancy GitHub button for desktop
return <GitHubButton />;
};

export default CustomGithubNavbarItem;
Loading