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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PUBLIC_GA_ID=
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ dist/
.DS_Store

# vscode settings
.vscode/
.vscode/

*.local
32 changes: 32 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ Agents (like Copilot) must adhere to these coding standards to ensure consistenc
2. **During Execution**
- When generating test files, suggest using Jest or Vitest (if no tests are found).
- For updates, refactor to use modular imports and maintain concise separation of logic.
- **Follow SEO and i18n guidelines** defined in section 4 when creating or modifying pages.

3. **Post-Execution**
- Always include a test or linting step before suggesting commits.
Expand All @@ -156,4 +157,35 @@ Agents (like Copilot) must adhere to these coding standards to ensure consistenc

---

## 4. SEO and Page Creation Guidelines

Agents must ensure all new pages are optimized for search engines and follow the project's internationalization (i18n) structure.

### Multi-language Pages
- All new pages must be placed in `src/pages/[lang]/`.
- Use `getStaticPaths()` to support all configured locales (`es`, `en`, `ca`).
- Example structure:
```typescript
export function getStaticPaths() {
return [{ params: { lang: 'es' } }, { params: { lang: 'en' } }, { params: { lang: 'ca' } }]
}
```

### Layout and Metadata
- Every page **must** use the `Layout` component from `src/layouts/Layout.astro`.
- Pass a unique and descriptive `title` and `description` (150-160 characters) to the `Layout` component.
- The `Layout` component automatically handles canonical URLs, social media tags (OG/Twitter), and `hreflang` tags.

### Semantic HTML and Accessibility
- **H1 Tags**: Use exactly one `<h1>` per page.
- **Headings**: Maintain a logical hierarchy (`h2`, `h3`, etc.).
- **Images**: All `<img>` tags must include a descriptive `alt` attribute.
- **Links**: Use descriptive text for links. Avoid generic phrases like "click here".

### Analytics and Monitoring
- Use the `PUBLIC_GA_ID` environment variable for Google Analytics.
- Do not hardcode tracking IDs.

---

Adhering to these standards will ensure contributions are cohesive, minimizing review cycles and enhancing overall productivity.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,41 @@ pnpm build
```bash
pnpm preview
```

## SEO & New Pages

To maintain good SEO and consistency as the project grows, follow these guidelines when adding new pages:

### 1. Creating Multi-language Pages
New pages should be created in `src/pages/[lang]/` using `getStaticPaths`.
- Ensure you use the `<Layout>` component.
- Always provide a unique `title` and `description` to the Layout.

Example:
```astro
---
import Layout from '../../layouts/Layout.astro'
// ...
---
<Layout title="Your Page Title" description="Concise description (150-160 chars)">
<!-- Content -->
</Layout>
```

### 2. SEO Best Practices
- **Semantic HTML**: Use only one `<h1>` per page. Follow a logical heading hierarchy (`<h2>`, `<h3>`).
- **Image Alt Tags**: All `<img>` tags MUST have descriptive `alt` attributes.
- **Internal Linking**: Use descriptive link text (avoid "click here").

### 3. Analytics
- Set the `PUBLIC_GA_ID` environment variable in your `.env` file to enable Google Analytics.
```text
PUBLIC_GA_ID=G-XXXXXXXXXX
```

### 4. Structured Data
- The main event structured data (JSON-LD) is globally included in `Layout.astro`.
- For specific pages (like "Sponsors" or "Talks"), consider adding additional [schema.org](https://schema.org) types locally if necessary.

### 5. Sitemap
- The sitemap is automatically generated on every build. No manual action is required.
2 changes: 2 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { defineConfig } from 'astro/config'
import tailwindcss from '@tailwindcss/vite'
import sitemap from '@astrojs/sitemap'

export default defineConfig({
site: 'https://2026.es.pycon.org',
base: '/',
integrations: [sitemap()],
vite: {
plugins: [tailwindcss()],
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"license": "ISC",
"packageManager": "pnpm@10.10.0",
"dependencies": {
"@astrojs/sitemap": "^3.7.1",
"@fontsource-variable/jetbrains-mono": "^5.2.8",
"@fontsource-variable/outfit": "^5.2.8",
"@tailwindcss/vite": "^4.1.18",
Expand Down
Loading
Loading