mirror of
https://github.com/andwati/pwnforfunandprofit.xyz.git
synced 2026-11-16 14:55:11 +00:00
feat: Establish CI pipeline, pre-commit hooks, and code quality linting for improved developer experience.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
applyTo: "**/*"
|
||||
applyTo: '**/*'
|
||||
---
|
||||
|
||||
# Copilot Instructions for pwnforfunandprofit.xyz
|
||||
@@ -13,6 +13,7 @@ Produce production-grade changes that are correct, verifiable, maintainable, and
|
||||
## 1. Project Context
|
||||
|
||||
### Workspace Structure
|
||||
|
||||
- **Framework**: Zola (Rust-based static site generator)
|
||||
- **Templates**: Tera templates (`templates/`)
|
||||
- **Styling**: SCSS (`sass/`)
|
||||
@@ -22,6 +23,7 @@ Produce production-grade changes that are correct, verifiable, maintainable, and
|
||||
- **Skill Instructions**: High-level AI design rules (`llms/`)
|
||||
|
||||
### Key Dependencies & Tools
|
||||
|
||||
- **Zola**: Static Site Generator (v0.22.1)
|
||||
- **Template Engine**: Tera (Django/Jinja2-like)
|
||||
- **Styling**: Vanilla SCSS (No Tailwind or external CSS themes allowed)
|
||||
@@ -32,6 +34,7 @@ Produce production-grade changes that are correct, verifiable, maintainable, and
|
||||
- **Comments**: Utterances (GitHub issues based)
|
||||
|
||||
### Runtime & Commands
|
||||
|
||||
- **Serve Locally**: `zola serve`
|
||||
- **Build**: `zola build`
|
||||
- **Check/Lint**: `zola check`
|
||||
@@ -63,6 +66,7 @@ When instructions conflict, follow this order:
|
||||
## 4. Definition of Done (Mandatory)
|
||||
|
||||
A task is complete only when all applicable items pass:
|
||||
|
||||
1. ✓ Requested behavior implemented.
|
||||
2. ✓ `zola check` detects no orphaned links or missing taxonomies.
|
||||
3. ✓ `zola build` outputs seamlessly in less than a second.
|
||||
@@ -74,10 +78,12 @@ A task is complete only when all applicable items pass:
|
||||
## 5. Mandatory Execution Workflow
|
||||
|
||||
### Initialization
|
||||
|
||||
1. Check existing implementations in `templates/` and `sass/`.
|
||||
2. Use absolute URLs (`get_url()`) inside templates instead of relative paths.
|
||||
|
||||
### Implementation
|
||||
|
||||
3. Implement in small, verifiable increments.
|
||||
4. If modifying SCSS variables or structural Tera blocks, verify via:
|
||||
```bash
|
||||
@@ -85,6 +91,7 @@ A task is complete only when all applicable items pass:
|
||||
```
|
||||
|
||||
### Verification
|
||||
|
||||
5. Spin up the server to verify visual cadence:
|
||||
```bash
|
||||
zola serve
|
||||
@@ -99,19 +106,21 @@ A task is complete only when all applicable items pass:
|
||||
- **Forbidden**: commented-out code, generic placeholder names (e.g. "John Doe", "Acme"), emojis in code or text (unless explicitly requested).
|
||||
- **Allowed**: required comments explaining non-obvious logic.
|
||||
- Keep SCSS deterministic: Rely on global variables rather than arbitrary hardcoded hexs.
|
||||
- Never use emojis in code, documentation, commit messages, or alt texts.
|
||||
- Never use emojis in code, documentation, commit messages, or alt texts.
|
||||
|
||||
---
|
||||
|
||||
## 7. Frontend Rules (Zola + SCSS)
|
||||
|
||||
### 7.1 Architecture
|
||||
|
||||
- Use `{% extends "base.html" %}` to establish layout inheritance.
|
||||
- Leverage `{% block %}` elements for page-specific overrides.
|
||||
- Use `config.extra.*` for user-defined configuration toggles.
|
||||
- Never write JS SPAs inside this structure: interactivity resides in targeted Vanilla JS files in `static/js/`.
|
||||
|
||||
### 7.2 Styling Constraints
|
||||
|
||||
- Rely exclusively on internal SCSS architecture. Do not suggest or install TailwindCSS.
|
||||
- Follow `llms/taste-skill.md` requirements:
|
||||
- Dark Mode overrides inside `html.dark`.
|
||||
@@ -121,6 +130,7 @@ A task is complete only when all applicable items pass:
|
||||
- Ensure focus rings and accessible outlines exist.
|
||||
|
||||
### 7.3 Content Constraints
|
||||
|
||||
- All Markdown files must be prefixed with valid TOML frontmatter (`+++`).
|
||||
- Frontmatter must include: `title`, `date`.
|
||||
- Do not utilize unsupported Markdown extensions (Zola relies on CommonMark + specific extensions configurable in `zola.toml`).
|
||||
@@ -139,12 +149,15 @@ python3 scripts/migrate.py # Re-run Substack migration script if testing feeds
|
||||
## 9. Quick Help
|
||||
|
||||
### "My template is failing to build with a parse error"
|
||||
|
||||
→ Zola's Tera engine uses `{{ variable }}` for printing and `{% expression %}` for logic. Check your variable structures.
|
||||
|
||||
### "Styles updates aren't applying"
|
||||
|
||||
→ Ensure `compile_sass` is enabled in `zola.toml` and you are modifying valid `.scss` assets inside `sass/`.
|
||||
|
||||
### "My taxonomy doesn't work or throws an error"
|
||||
|
||||
→ If you see `Tried to render taxonomy_list.html`, ensure you created the taxonomy view templates and registered the taxonomy array in `zola.toml`.
|
||||
|
||||
---
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Zola
|
||||
uses: snok/install-zola@v2
|
||||
|
||||
- name: Run Zola Check
|
||||
run: zola check
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v3
|
||||
with:
|
||||
version: 10
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Format Check
|
||||
run: pnpm run format:check
|
||||
|
||||
- name: Markdown Lint
|
||||
run: pnpm run lint
|
||||
|
||||
- name: Spell Check
|
||||
run: npx cspell "content/**/*.md"
|
||||
Reference in New Issue
Block a user