From f520db7a9dfdd9518090ce48b4ffc0b132ed26b3 Mon Sep 17 00:00:00 2001 From: Pascal Martineau Date: Tue, 13 Jan 2026 09:24:17 -0500 Subject: [PATCH] feat: Update .gitignore and add Copilot instructions --- .github/copilot-instructions.md | 34 +++++++++++++++++++++++++++++++++ .gitignore | 1 + phpcs.xml | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..55e098a --- /dev/null +++ b/.github/copilot-instructions.md @@ -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: **don’t 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 repo’s ESLint/Tailwind conventions (VS Code settings treat `*.css` as TailwindCSS and support Nuxt UI `ui` attributes). diff --git a/.gitignore b/.gitignore index 848be7e..836787f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /* !/.cpanel.yml !/.gitea +!/.github !/.gitignore !/.vscode !/README.md diff --git a/phpcs.xml b/phpcs.xml index 183705c..a9fe92c 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -1,5 +1,5 @@ - wp-content/themes/wp-boilerplate/ + wp-content/themes/moonshine/