feat: Update .gitignore and add Copilot instructions

This commit is contained in:
2026-01-13 09:24:17 -05:00
parent 3d7a2b2ef6
commit f520db7a9d
3 changed files with 36 additions and 1 deletions

34
.github/copilot-instructions.md vendored Normal file
View File

@@ -0,0 +1,34 @@
# Copilot instructions (wp-headless)
## Overview
- This project is a full WordPress install (core lives in `wp-admin/` + `wp-includes/`). Treat core files as upstream: **dont implement features by editing WordPress core or plugins**.
- Project-specific code lives in `wp-content/themes/moonshine/`:
- “Headless” stack is assembled via custom theme and plugins:
- `wp-content/themes/moonshine/` provides the WordPress PHP theme logic and Nuxt frontend.
- `wp-content/plugins/wp-graphql/` provides the GraphQL endpoint (typically `/graphql`).
- `wp-content/plugins/wpgraphql-acf/` exposes ACF fields in the GraphQL schema.
- `wp-content/plugins/wp-graphql-headless-login/` provides GraphQL-based authentication flows.
## Where to make changes
- **Changes should only be made in the Moonshine theme `wp-content/themes/moonshine/`**
- WordPress PHP theme logic lives in `wp-content/themes/moonshine/includes/`.
- Nuxt frontend (Nuxt 4): `wp-content/themes/moonshine/`
- App entry & routes: `wp-content/themes/moonshine/app/` (catch-all route is `app/pages/[...uri].vue`).
- Config: `wp-content/themes/moonshine/nuxt.config.ts`.
- Package manager: **pnpm** (`pnpm-lock.yaml` is present).
## Developer workflows
- **WP Headless** - WordPress Composer project (root folder):
- Install PHP deps (also manages WP plugins/themes via Composer repos): `composer install`.
- Update PHP deps / WordPress plugins: `composer update`.
- Composer uses an internal Satis repo (`https://satis.ledevsimple.ca`) plus `wpackagist.org`.
- PHP linting (phpcs):`composer lint`
- PHP beautifier (phpcbf): `composer lintfix`
- **Moonshine** - Headless WordPress theme based on Nuxt 4 (`wp-content/themes/moonshine/`):
- Dev: `pnpm dev`
- Build: `pnpm build`
- Lint (autofix): `pnpm lint`
## Conventions to follow
- Prefer adding project behavior via WordPress hooks/filters in the theme (`moonshine_*` functions) or via plugins—avoid editing WP core at all cost.
- In the Nuxt app, prefer the repos ESLint/Tailwind conventions (VS Code settings treat `*.css` as TailwindCSS and support Nuxt UI `ui` attributes).

1
.gitignore vendored
View File

@@ -2,6 +2,7 @@
/*
!/.cpanel.yml
!/.gitea
!/.github
!/.gitignore
!/.vscode
!/README.md

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<ruleset name="wp-boilerplate">
<rule ref="WebsimpleWP"/>
<file>wp-content/themes/wp-boilerplate/</file>
<file>wp-content/themes/moonshine/</file>
</ruleset>