From 8e9df397de1abb608e4fb233de9d31210e555d1b Mon Sep 17 00:00:00 2001 From: "Juan V." <69489757+edujuan@users.noreply.github.com> Date: Wed, 6 Aug 2025 18:20:20 +0200 Subject: [PATCH] Home paged removed Co-authored-by: Razvan Radulescu <43811028+h3xxit@users.noreply.github.com> --- docusaurus.config.ts | 51 +++++++++---------- .../index.tsx | 0 .../styles.module.css | 0 ...dex.module.css => index.module.css.backup} | 0 src/pages/{index.tsx => index.tsx.backup} | 4 +- .../NavbarItem/CustomGithubNavbarItem.tsx | 26 ++-------- 6 files changed, 30 insertions(+), 51 deletions(-) rename src/components/{HomepageFeatures => HomepageFeatures.backup}/index.tsx (100%) rename src/components/{HomepageFeatures => HomepageFeatures.backup}/styles.module.css (100%) rename src/pages/{index.module.css => index.module.css.backup} (100%) rename src/pages/{index.tsx => index.tsx.backup} (98%) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index b5675f9..653f5c4 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -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, @@ -82,6 +82,10 @@ const config: Config = { '@docusaurus/plugin-client-redirects', { redirects: [ + { + to: '/', + from: '/docs', + }, { to: '/about/RFC', from: '/RFC', @@ -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', @@ -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', @@ -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', }, ], }, diff --git a/src/components/HomepageFeatures/index.tsx b/src/components/HomepageFeatures.backup/index.tsx similarity index 100% rename from src/components/HomepageFeatures/index.tsx rename to src/components/HomepageFeatures.backup/index.tsx diff --git a/src/components/HomepageFeatures/styles.module.css b/src/components/HomepageFeatures.backup/styles.module.css similarity index 100% rename from src/components/HomepageFeatures/styles.module.css rename to src/components/HomepageFeatures.backup/styles.module.css diff --git a/src/pages/index.module.css b/src/pages/index.module.css.backup similarity index 100% rename from src/pages/index.module.css rename to src/pages/index.module.css.backup diff --git a/src/pages/index.tsx b/src/pages/index.tsx.backup similarity index 98% rename from src/pages/index.tsx rename to src/pages/index.tsx.backup index f0677f8..b370456 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx.backup @@ -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(450); // Default fallback based on current count diff --git a/src/theme/NavbarItem/CustomGithubNavbarItem.tsx b/src/theme/NavbarItem/CustomGithubNavbarItem.tsx index f1cebdd..7fcfc2a 100644 --- a/src/theme/NavbarItem/CustomGithubNavbarItem.tsx +++ b/src/theme/NavbarItem/CustomGithubNavbarItem.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { useLocation } from '@docusaurus/router'; import GitHubButton from '../../components/GitHubButton'; interface CustomGithubNavbarItemProps { @@ -22,10 +21,7 @@ const GitHubIcon: React.FC<{ className?: string }> = ({ className = "" }) => ( ); const CustomGithubNavbarItem: React.FC = ({ 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 ( = ({ mobile, ); } - // Show fancy button only on blog pages, normal link elsewhere - if (isBlogPage) { - return ; - } - - // Normal GitHub link for non-blog pages with icon - return ( - - - - ); + // Always show the fancy GitHub button for desktop + return ; }; export default CustomGithubNavbarItem; \ No newline at end of file