Skip to content
Open
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
60 changes: 0 additions & 60 deletions .github/workflows/pages.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/site-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Site checks

on:
pull_request:
paths:
- "site/**"
- ".github/workflows/site-check.yml"

permissions:
contents: read

jobs:
site:
name: Validate agentic-navigation-guide site
runs-on: ubuntu-latest
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 22
cache: npm
cache-dependency-path: site/package-lock.json
- name: Install dependencies
run: npm ci
- name: Check formatting
run: npm run format:check
- name: Spellcheck content
run: npm run spellcheck
- name: Typecheck Astro content
run: npm run check
- name: Build site
run: npm run build
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Run validation tests
run: npm run test
51 changes: 51 additions & 0 deletions .github/workflows/site-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publish site

on:
push:
branches: ["main"]
paths:
- "site/**"
- ".github/workflows/site-publish.yml"
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
name: Build agentic-navigation-guide site
runs-on: ubuntu-latest
defaults:
run:
working-directory: site
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 22
cache: npm
cache-dependency-path: site/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
with:
path: site/dist

deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
38 changes: 26 additions & 12 deletions AGENTIC_NAVIGATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,43 @@
- init.rs # init subcommand
- verify.rs # verify subcommand
- site/ # Astro/Starlight static site for GitHub Pages
- .gitignore # site-local generated output ignores
- .prettierignore # site formatter excludes
- .prettierrc # prettier plugin and parser overrides (Astro)
- README.md # template-generated site usage notes
- astro.config.mjs # Astro and Starlight configuration
- cspell.json # site spellcheck dictionary
- justfile # template site task aliases
- package.json # site npm scripts and dependencies
- package-lock.json # locked site dependency graph
- playwright.config.ts # rendered-site Playwright validation config
- tsconfig.json # Astro TypeScript config
- public/
- .nojekyll # keep GitHub Pages from running Jekyll
- favicon.svg # generated site favicon
- src/
- assets/
- tool-mark.svg # generated project mark asset
- content.config.ts # Starlight content collection config
- env.d.ts # Astro environment type references
- pages/
- index.astro # custom landing page
- index.astro # template-based landing page
- scripts/
- landing.ts # mobile navigation and copy-button behavior
- site.config.mjs # generated project/site data consumed by Astro
- content/
- docs/
- docs/
- index.md # documentation landing page
- commands.md # CLI command reference
- guide-format.md # guide syntax reference
- ci.md # CI and hooks guide
- index.mdx # documentation landing page
- commands.mdx # CLI command reference
- guide-format.mdx # guide syntax reference
- ci.mdx # CI and hooks guide
- styles/
- components.css # component stylesheet imports
- core-primitives.components.css # primitive component styles
- cards-composites.components.css # card and composite component styles
- data-display.components.css # badge and code-display styles
- navigation-layout.components.css # navigation and layout component styles
- landing.css # landing page layout and illustration styles
- landing.css # template landing layout with project visual styling
- starlight.css # Starlight theme overrides
- tokens.css # design tokens
- theme.css # generated theme variables
- tests/
- site.spec.ts # Playwright, link, viewport, and axe checks
- ... # Local build output and dependencies
- Cargo.toml
- README.md
Expand Down
7 changes: 7 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.astro/
.playwright-browsers/
dist/
node_modules/
playwright-report/
test-results/
*.log
7 changes: 7 additions & 0 deletions site/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.astro
.playwright-browsers
dist
node_modules
package-lock.json
playwright-report
test-results
11 changes: 11 additions & 0 deletions site/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plugins": ["prettier-plugin-astro"],
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
}
]
}
23 changes: 23 additions & 0 deletions site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# agentic-navigation-guide site

Static Astro/Starlight site generated from `static-tool-page-template`.

## Common commands

```sh
just install
just dev
just check
just test
just build
```

The site is configured for `https://plx.github.io/agentic-navigation-guide/` with the GitHub Pages base path `/agentic-navigation-guide`.

The generated Playwright suite runs against mobile, tablet, and desktop projects.
Use `just install-browsers` once locally before `just test`.
If port 4321 is already occupied, run tests with another port:

```sh
SITE_TEST_PORT=54321 just test
```
68 changes: 44 additions & 24 deletions site/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,42 +1,62 @@
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import { siteConfig } from "./src/site.config.mjs";

const fontStylesheetUrl = "https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Condensed:wght@600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap";
const fontStylesheetUrl =
"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Condensed:wght@600;700&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap";

const basePath =
siteConfig.site.basePath === "/" ? "" : siteConfig.site.basePath;
/** @param {string} path */
const siteAsset = (path) => `${basePath}/${path.replace(/^\/+/, "")}`;

export default defineConfig({
site: "https://plx.github.io",
base: "/agentic-navigation-guide",
site: siteConfig.site.host,
base: siteConfig.site.basePath,
trailingSlash: "always",
integrations: [
starlight({
title: "Agentic Navigation Guide",
description: "A Rust CLI for maintaining accurate repository navigation guides for coding agents.",
title: siteConfig.project.title,
description: siteConfig.project.description,
logo: {
src: "./src/assets/tool-mark.svg",
alt: "",
},
customCss: ["./src/styles/starlight.css"],
head: [
{ tag: "link", attrs: { rel: "preconnect", href: "https://fonts.googleapis.com" } },
{ tag: "link", attrs: { rel: "preconnect", href: "https://fonts.gstatic.com", crossorigin: "" } },
{ tag: "link", attrs: { rel: "stylesheet", href: fontStylesheetUrl } }
{
tag: "link",
attrs: { rel: "preconnect", href: "https://fonts.googleapis.com" },
},
{
tag: "link",
attrs: {
rel: "preconnect",
href: "https://fonts.gstatic.com",
crossorigin: "",
},
},
{ tag: "link", attrs: { rel: "stylesheet", href: fontStylesheetUrl } },
{
tag: "link",
attrs: {
rel: "icon",
href: siteAsset("favicon.svg"),
type: "image/svg+xml",
},
},
],
social: [
{
icon: "github",
label: "GitHub",
href: "https://github.com/plx/agentic-navigation-guide"
}
href: siteConfig.repository.url,
},
],
editLink: {
baseUrl: "https://github.com/plx/agentic-navigation-guide/edit/main/site/src/content/docs/"
baseUrl: `${siteConfig.repository.url}/edit/${siteConfig.repository.defaultBranch}/site/src/content/docs/`,
},
sidebar: [
{
label: "Guide",
items: [
{ label: "Overview", slug: "docs" },
{ label: "Commands", slug: "docs/commands" },
{ label: "Guide Format", slug: "docs/guide-format" },
{ label: "CI and Hooks", slug: "docs/ci" }
]
}
]
})
]
sidebar: siteConfig.docs.sidebar,
}),
],
});
Loading
Loading