Search by

davidhirtz / website

davidhirtz

Website template for yii2-cms

Package info

github.com/davidhirtz/website

Type:project

pkg:composer/davidhirtz/website

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

3.0.2 2026-10-18 14:13 UTC

This package is auto-updated.

Last update: 2026-10-18 18:30:03 UTC


README

A website built on Yii 2 and yii2-cms: pages made of typed sections, a media library with responsive images, menus, a cookie consent banner that blocks external content until it is allowed, and an admin to edit it all.

Creating a project

composer create-project davidhirtz/website my-site

The installer asks for the project's name, the database and a preset — bare for two text section types and nothing else, or starter for nine more (hero banner, image & text, carousel, gallery, quote, call to action, accordion, teasers) and demo content. It creates the databases, writes the configuration, creates the first user and makes the "Initial commit". See installation.

Without PHP, clone this repository and run the installer and the site in Docker:

git clone https://github.com/davidhirtz/website.git my-site && cd my-site
docker compose run --rm app sh installer/docker.sh
docker compose up

Getting started

Requires PHP 8.3+ with imagick, MySQL or MariaDB, Composer and Node.js 20.19+.

git clone git@github.com:OWNER/REPOSITORY.git
cd REPOSITORY
composer install && composer install-hooks
npm install
php yii params && php yii migrate && php yii user/create && php yii setup
YII_ENV=dev php -S localhost:8080 -t web

Sign in at http://localhost:8080/admin.

Or, with nothing but Docker, docker compose up and sign in as admin@example.com with the password website123, see Docker.

Everyday commands

npm run dev                         # Vite dev server
npm run build                       # build web/dist — commit it, the deploy does not build
composer check                      # code style, static analysis and tests, as CI runs them
composer cs-fix                     # fix the code style
./yii message                       # update the translation files

Documentation

License

Released under the MIT License.