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
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm exec commitlint --edit "$1"
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pnpm astro check
pnpm exec lint-staged
29 changes: 0 additions & 29 deletions .pre-commit-config.yaml

This file was deleted.

10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ Website for the most important Python [event](https://2026.es.pycon.org/) in Spa

- Node.js v22.0.0 (see `.nvmrc`)
- pnpm
- [pre-commit](https://pre-commit.com/)

## Installation

```bash
pnpm install
pre-commit install
```

## Development
Expand All @@ -38,35 +36,43 @@ pnpm preview
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.
15 changes: 14 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"format": "prettier --write src"
"format": "prettier --write src",
"prepare": "husky"
},
"keywords": [],
"author": "",
Expand All @@ -26,6 +27,10 @@
},
"devDependencies": {
"@astrojs/check": "^0.9.6",
"@commitlint/cli": "^20.5.0",
"@commitlint/config-conventional": "^20.5.0",
"husky": "^9.1.7",
"lint-staged": "^16.4.0",
"prettier": "^3.7.4",
"prettier-plugin-astro": "^0.14.1",
"typescript": "^5.9.3"
Expand All @@ -47,5 +52,13 @@
}
}
]
},
"lint-staged": {
"*.{ts,tsx,js,jsx,json,css,md,astro}": "prettier --check"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
}
}
Loading
Loading