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
6 changes: 6 additions & 0 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
# requires a token other than GITHUB_TOKEN to enable Pages via API.
#
# Live site: https://samplexbro.github.io/agentsmesh/ (see website/astro.config.mjs `site` + `base`).
#
# SEO: set repository variable DEPLOY_SITE_URL to the exact origin you want indexed
# (HTTPS, no trailing slash), e.g. https://samplexbro.github.io or your custom domain.
# Configure DNS or CDN to 301 the non-canonical hostname (www ↔ apex) to that URL.
name: Deploy Website

on:
Expand Down Expand Up @@ -53,6 +57,8 @@ jobs:

- name: Build website
working-directory: website
env:
DEPLOY_SITE_URL: ${{ vars.DEPLOY_SITE_URL }}
run: pnpm run build

- name: Upload Pages artifact
Expand Down
13 changes: 10 additions & 3 deletions website/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import seoRobotsIntegration from './integrations/seo-robots.mjs';
import { absoluteFromBase, getSiteOrigin } from './site-url.mjs';

const site = getSiteOrigin();
const ogImage = absoluteFromBase('/og-image.png');

export default defineConfig({
site: 'https://samplexbro.github.io',
site,
trailingSlash: 'always',
base: '/agentsmesh',
integrations: [
starlight({
Expand All @@ -30,15 +36,15 @@ export default defineConfig({
head: [
{
tag: 'meta',
attrs: { property: 'og:image', content: 'https://samplexbro.github.io/agentsmesh/og-image.png' },
attrs: { property: 'og:image', content: ogImage },
},
{
tag: 'meta',
attrs: { name: 'twitter:card', content: 'summary_large_image' },
},
{
tag: 'meta',
attrs: { name: 'twitter:image', content: 'https://samplexbro.github.io/agentsmesh/og-image.png' },
attrs: { name: 'twitter:image', content: ogImage },
},
{
tag: 'meta',
Expand Down Expand Up @@ -117,5 +123,6 @@ export default defineConfig({
},
],
}),
seoRobotsIntegration(() => getSiteOrigin()),
],
});
21 changes: 21 additions & 0 deletions website/integrations/seo-robots.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { writeFileSync } from 'node:fs';

/**
* @param {() => string} getOrigin Host-only HTTPS URL, no trailing slash
*/
export default function seoRobotsIntegration(getOrigin) {
return {
name: 'seo-robots',
hooks: {
'astro:build:done': ({ dir }) => {
const origin = getOrigin().replace(/\/$/, '');
const body = `User-agent: *
Allow: /

Sitemap: ${origin}/agentsmesh/sitemap-index.xml
`;
writeFileSync(new URL('robots.txt', dir), body, 'utf8');
},
},
};
}
4 changes: 0 additions & 4 deletions website/public/robots.txt

This file was deleted.

23 changes: 23 additions & 0 deletions website/site-url.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Single source of truth for the docs site origin. Set DEPLOY_SITE_URL in CI
* (GitHub repository variable) to your indexed hostname — e.g. apex HTTPS URL
* with no trailing slash. Configure DNS/CDN to 301 the non-canonical host (www vs apex).
*/

/** @returns {string} e.g. https://samplexbro.github.io */
export function getSiteOrigin() {
const raw =
process.env.DEPLOY_SITE_URL?.trim() ||
process.env.SITE_URL?.trim() ||
'https://samplexbro.github.io';
return raw.replace(/\/$/, '');
}

/** @param {string} pathWithLeadingSlash path after base, e.g. /og-image.png */
export function absoluteFromBase(pathWithLeadingSlash) {
const origin = getSiteOrigin();
const suffix = pathWithLeadingSlash.startsWith('/')
? pathWithLeadingSlash
: `/${pathWithLeadingSlash}`;
return `${origin}/agentsmesh${suffix}`;
}
23 changes: 23 additions & 0 deletions website/src/components/SoftwareApplicationJsonLd.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
const origin = Astro.site?.origin ?? 'https://samplexbro.github.io';
const base = import.meta.env.BASE_URL;
const docsRoot = `${origin.replace(/\/$/, '')}${base}`.replace(/\/?$/, '/');

const jsonLd = {
'@context': 'https://schema.org',
'@type': 'SoftwareApplication',
name: 'AgentsMesh',
description:
'Open-source CLI that syncs AI coding assistant configuration across every major tool — Claude Code, Cursor, Copilot, Gemini CLI, Windsurf, and more. One canonical .agentsmesh/ directory with bidirectional import, generate, community skill registry, and CI drift detection.',
applicationCategory: 'DeveloperApplication',
operatingSystem: 'Node.js 20+',
offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' },
license: 'https://opensource.org/licenses/MIT',
url: docsRoot,
downloadUrl: 'https://www.npmjs.com/package/agentsmesh',
codeRepository: 'https://github.com/sampleXbro/agentsmesh',
author: { '@type': 'Person', name: 'sampleXbro' },
};
---

<script type="application/ld+json" set:html={JSON.stringify(jsonLd)} />
23 changes: 2 additions & 21 deletions website/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ hero:

import { Card, CardGrid, Badge, Aside } from '@astrojs/starlight/components';
import CatalogExplorer from '../../components/catalog-explorer/CatalogExplorer.astro';
import SoftwareApplicationJsonLd from '../../components/SoftwareApplicationJsonLd.astro';

<CatalogExplorer />

Expand Down Expand Up @@ -142,24 +143,4 @@ npx agentsmesh generate
The CLI is available as both `agentsmesh` and the shorter alias `amsh`.
</Aside>

<script type="application/ld+json" set:html={JSON.stringify({
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "AgentsMesh",
"description": "Open-source CLI that syncs AI coding assistant configuration across every major tool — Claude Code, Cursor, Copilot, Gemini CLI, Windsurf, and more. One canonical .agentsmesh/ directory with bidirectional import, generate, community skill registry, and CI drift detection.",
"applicationCategory": "DeveloperApplication",
"operatingSystem": "Node.js 20+",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
},
"license": "https://opensource.org/licenses/MIT",
"url": "https://samplexbro.github.io/agentsmesh/",
"downloadUrl": "https://www.npmjs.com/package/agentsmesh",
"codeRepository": "https://github.com/sampleXbro/agentsmesh",
"author": {
"@type": "Person",
"name": "sampleXbro"
}
})} />
<SoftwareApplicationJsonLd />
Loading