|
| 1 | +# FIP Guide Guidelines |
| 2 | + |
| 3 | +## Content Guidelines |
| 4 | + |
| 5 | +- Content MUST support all three languages (en, de, fr) |
| 6 | +- NEVER change the meaning of content when translating. Always translate as 1:1. |
| 7 | +- ALWAYS align the content with the corresponding base (defined in `archetypes`) |
| 8 | +- ALWAYS use the exact translations for headlines (defined in `archetypes`) |
| 9 | +- ALWAYS create new content pages with `hugo new {base}/{name}` where base can be `country`, `operator` or `booking`. |
| 10 | + |
| 11 | +### Glossary |
| 12 | + |
| 13 | +- Use "Freifahrtschein" instead of "Freifahrtsschein" |
| 14 | +- Use "FIP Coupon" instead of "FIP free travel" |
| 15 | +- Use "Motorail train" instead of "car train" |
| 16 | +- Use "Break of journey" instead of "Journey Interruption" |
| 17 | + |
| 18 | +### Translations |
| 19 | + |
| 20 | +| Deutsch | Englisch | Französisch | |
| 21 | +| ------------------- | --------------- | ---------------- | |
| 22 | +| FIP Freifahrtschein | FIP Coupon | Coupon FIP | |
| 23 | +| FIP Globalpreis | FIP Global Fare | Tarif Global FIP | |
| 24 | +| FIP 50 Ticket | FIP 50 Ticket | Billet FIP 50 | |
| 25 | + |
| 26 | +## Development Guidelines |
| 27 | + |
| 28 | +### Build/Test Commands |
| 29 | + |
| 30 | +- `hugo serve`: Start local development server |
| 31 | +- `hugo --gc --minify`: Build for production |
| 32 | +- `npx prettier --write .`: Format code |
| 33 | +- `npx pagefind --site public`: Generate search index |
| 34 | +- `pre-commit run --all-files`: Run all pre-commit checks |
| 35 | + |
| 36 | +### Code Style & Conventions |
| 37 | + |
| 38 | +- **HTML Templates**: Use Hugo / Go template syntax |
| 39 | +- **JavaScript**: ES6 modules with relative imports (`./filename.js`). |
| 40 | +- **CSS/SCSS**: Use SCSS with BEM-like naming, variables defined in `_variables.scss` |
| 41 | +- **Markdown**: Frontmatter in YAML format, use shortcodes for complex layouts |
| 42 | +- **i18n**: Files in `i18n/` sorted alphabetically by key, support en/de/fr languages |
| 43 | + |
| 44 | +### File Structure |
| 45 | + |
| 46 | +- Content in `content/` with multilingual structure (`index.en.md`, `index.de.md`, `index.fr.md`) |
| 47 | +- Layouts in `layouts/` following Hugo conventions: |
| 48 | + - Partials for reusable components in HTML files in `layouts/partials/` |
| 49 | + - Shortcodes for reusable components in Markdown files in `layouts/shortcodes/` |
| 50 | +- Assets in `assets/` (processed) and `static/` (copied as-is) |
| 51 | + |
| 52 | +## Quality Standards |
| 53 | + |
| 54 | +- All commits MUST pass the pre-commit hooks defined in `.pre-commit-config.yaml` |
| 55 | +- HTML templates must be valid Go template syntax |
| 56 | +- Do NOT add any comments to the code |
| 57 | +- NEVER create markdown files outside the content directory |
0 commit comments