Skip to content
View codecharmer's full-sized avatar

Block or report codecharmer

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
codecharmer/README.md

Code Charmer

Site for codecharmer.io — a custom WordPress block theme + core plugin monorepo. Every section is a server-rendered Gutenberg block; the site converted from (and stays pixel-faithful to) the original static Astro build, which lives in git history.

wp-content/themes/codecharmer/        Block theme — presentation only
wp-content/plugins/codecharmer-core/  Engine: blocks, CPTs, REST, SEO, seeder

Requirements

  • Node.js ≥ 20 (pinned via .nvmrc — run nvm use)
  • Composer (PHP tooling; code targets PHP 8.3 / WP 6.8+)
  • Docker (for wp-env local WordPress)

Getting started

nvm use
npm install          # workspaces: theme + plugin (+ @wordpress/scripts)
composer install     # phpcs (WordPress + WordPress VIP standards), phpstan
npm run build        # compile the Gutenberg blocks into the plugin's build/
npm run env:start    # boot local WordPress (wp-env)

Then activate and seed:

npm run env:cli -- theme activate codecharmer
npm run env:cli -- plugin activate codecharmer-core
npm run env:install-content    # wp codecharmer install — pages, projects, media

Local site: http://localhost:8888 (admin: admin / password).

Quality gates

composer run lint    # PHPCS: WordPress-Core/Extra/Docs + WordPress-VIP-Go — must be clean
composer run analyze # PHPStan level 6 (advisory)
npm run lint         # eslint + stylelint (@wordpress presets)
npm run build        # blocks must compile

CI (.github/workflows/ci.yml) enforces the same on every push and PR.

Content model

Pages are seeded once by wp codecharmer install from wp-content/plugins/codecharmer-core/data/*.php (block-grammar heredocs — the "brand layer"). After the first deploy the marker file .wp-content-seeded prevents re-seeding, so owner edits are never overwritten. Projects are cc_project posts; services are pages under /services carrying cc_icon / cc_descriptor / cc_thesis meta that the mega-menu and services blocks query.

Deploy

Pushing wp-content/** (or the manifests) to master triggers .github/workflows/deploy.yml:

  1. Build blocks (npm workspaces).
  2. Bootstrap WordPress core on the VPS if absent (first deploy only).
  3. rsync --delete scoped to the theme + plugin directories — core, wp-config.php, and uploads are never touched.
  4. Activate theme + plugin, seed once, flush object + cPanel NGINX caches.

Deploy plumbing is generated by ~/setup-vps-deploy.sh (see that script's --help for the WordPress mode flags, including --wp-reseed).

Popular repositories Loading

  1. fizbii fizbii Public

  2. lymin-vi lymin-vi Public

  3. yabo yabo Public

    PHP

  4. ye ye Public

    PHP

  5. capoeira capoeira Public

    HTML

  6. puracapoeira puracapoeira Public

    JavaScript