init
This commit is contained in:
commit
8e75a421d2
23 changed files with 2936 additions and 0 deletions
284
.ddev/config.yaml
Normal file
284
.ddev/config.yaml
Normal file
|
|
@ -0,0 +1,284 @@
|
|||
name: haikuatelier.fr
|
||||
type: wordpress
|
||||
docroot: web
|
||||
php_version: "8.3"
|
||||
webserver_type: nginx-fpm
|
||||
xdebug_enabled: false
|
||||
additional_hostnames: []
|
||||
additional_fqdns: []
|
||||
database:
|
||||
type: mariadb
|
||||
version: "10.11"
|
||||
use_dns_when_possible: true
|
||||
composer_version: "2"
|
||||
web_environment: []
|
||||
corepack_enable: false
|
||||
|
||||
# Key features of DDEV's config.yaml:
|
||||
|
||||
# name: <projectname> # Name of the project, automatically provides
|
||||
# http://projectname.ddev.site and https://projectname.ddev.site
|
||||
|
||||
# type: <projecttype> # backdrop, craftcms, django4, drupal, drupal6, drupal7, laravel, magento, magento2, php, python, shopware6, silverstripe, typo3, wordpress
|
||||
# See https://ddev.readthedocs.io/en/stable/users/quickstart/ for more
|
||||
# information on the different project types
|
||||
# "drupal" covers recent Drupal 8+
|
||||
|
||||
# docroot: <relative_path> # Relative path to the directory containing index.php.
|
||||
|
||||
# php_version: "8.2" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"
|
||||
|
||||
# You can explicitly specify the webimage but this
|
||||
# is not recommended, as the images are often closely tied to DDEV's' behavior,
|
||||
# so this can break upgrades.
|
||||
|
||||
# webimage: <docker_image> # nginx/php docker image.
|
||||
|
||||
# database:
|
||||
# type: <dbtype> # mysql, mariadb, postgres
|
||||
# version: <version> # database version, like "10.11" or "8.0"
|
||||
# MariaDB versions can be 5.5-10.8, 10.11, and 11.4.
|
||||
# MySQL versions can be 5.5-8.0.
|
||||
# PostgreSQL versions can be 9-16.
|
||||
|
||||
# router_http_port: <port> # Port to be used for http (defaults to global configuration, usually 80)
|
||||
# router_https_port: <port> # Port for https (defaults to global configuration, usually 443)
|
||||
|
||||
# xdebug_enabled: false # Set to true to enable Xdebug and "ddev start" or "ddev restart"
|
||||
# Note that for most people the commands
|
||||
# "ddev xdebug" to enable Xdebug and "ddev xdebug off" to disable it work better,
|
||||
# as leaving Xdebug enabled all the time is a big performance hit.
|
||||
|
||||
# xhprof_enabled: false # Set to true to enable Xhprof and "ddev start" or "ddev restart"
|
||||
# Note that for most people the commands
|
||||
# "ddev xhprof" to enable Xhprof and "ddev xhprof off" to disable it work better,
|
||||
# as leaving Xhprof enabled all the time is a big performance hit.
|
||||
|
||||
# webserver_type: nginx-fpm, apache-fpm, or nginx-gunicorn
|
||||
|
||||
# timezone: Europe/Berlin
|
||||
# This is the timezone used in the containers and by PHP;
|
||||
# it can be set to any valid timezone,
|
||||
# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# For example Europe/Dublin or MST7MDT
|
||||
|
||||
# composer_root: <relative_path>
|
||||
# Relative path to the Composer root directory from the project root. This is
|
||||
# the directory which contains the composer.json and where all Composer related
|
||||
# commands are executed.
|
||||
|
||||
# composer_version: "2"
|
||||
# You can set it to "" or "2" (default) for Composer v2 or "1" for Composer v1
|
||||
# to use the latest major version available at the time your container is built.
|
||||
# It is also possible to use each other Composer version channel. This includes:
|
||||
# - 2.2 (latest Composer LTS version)
|
||||
# - stable
|
||||
# - preview
|
||||
# - snapshot
|
||||
# Alternatively, an explicit Composer version may be specified, for example "2.2.18".
|
||||
# To reinstall Composer after the image was built, run "ddev debug refresh".
|
||||
|
||||
# nodejs_version: "20"
|
||||
# change from the default system Node.js version to any other version.
|
||||
# Numeric version numbers can be complete (i.e. 18.15.0) or
|
||||
# incomplete (18, 17.2, 16). 'lts' and 'latest' can be used as well along with
|
||||
# other named releases.
|
||||
# see https://www.npmjs.com/package/n#specifying-nodejs-versions
|
||||
# Note that you can continue using 'ddev nvm' or nvm inside the web container
|
||||
# to change the project's installed node version if you need to.
|
||||
|
||||
# corepack_enable: false
|
||||
# Change to 'true' to 'corepack enable' and gain access to latest versions of yarn/pnpm
|
||||
|
||||
# additional_hostnames:
|
||||
# - somename
|
||||
# - someothername
|
||||
# would provide http and https URLs for "somename.ddev.site"
|
||||
# and "someothername.ddev.site".
|
||||
|
||||
# additional_fqdns:
|
||||
# - example.com
|
||||
# - sub1.example.com
|
||||
# would provide http and https URLs for "example.com" and "sub1.example.com"
|
||||
# Please take care with this because it can cause great confusion.
|
||||
|
||||
# upload_dirs: "custom/upload/dir"
|
||||
#
|
||||
# upload_dirs:
|
||||
# - custom/upload/dir
|
||||
# - ../private
|
||||
#
|
||||
# would set the destination paths for ddev import-files to <docroot>/custom/upload/dir
|
||||
# When Mutagen is enabled this path is bind-mounted so that all the files
|
||||
# in the upload_dirs don't have to be synced into Mutagen.
|
||||
|
||||
# disable_upload_dirs_warning: false
|
||||
# If true, turns off the normal warning that says
|
||||
# "You have Mutagen enabled and your 'php' project type doesn't have upload_dirs set"
|
||||
|
||||
# ddev_version_constraint: ""
|
||||
# Example:
|
||||
# ddev_version_constraint: ">= 1.22.4"
|
||||
# This will enforce that the running ddev version is within this constraint.
|
||||
# See https://github.com/Masterminds/semver#checking-version-constraints for
|
||||
# supported constraint formats
|
||||
|
||||
# working_dir:
|
||||
# web: /var/www/html
|
||||
# db: /home
|
||||
# would set the default working directory for the web and db services.
|
||||
# These values specify the destination directory for ddev ssh and the
|
||||
# directory in which commands passed into ddev exec are run.
|
||||
|
||||
# omit_containers: [db, ddev-ssh-agent]
|
||||
# Currently only these containers are supported. Some containers can also be
|
||||
# omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit
|
||||
# the "db" container, several standard features of DDEV that access the
|
||||
# database container will be unusable. In the global configuration it is also
|
||||
# possible to omit ddev-router, but not here.
|
||||
|
||||
# performance_mode: "global"
|
||||
# DDEV offers performance optimization strategies to improve the filesystem
|
||||
# performance depending on your host system. Should be configured globally.
|
||||
#
|
||||
# If set, will override the global config. Possible values are:
|
||||
# - "global": uses the value from the global config.
|
||||
# - "none": disables performance optimization for this project.
|
||||
# - "mutagen": enables Mutagen for this project.
|
||||
# - "nfs": enables NFS for this project.
|
||||
#
|
||||
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#nfs
|
||||
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen
|
||||
|
||||
# fail_on_hook_fail: False
|
||||
# Decide whether 'ddev start' should be interrupted by a failing hook
|
||||
|
||||
# host_https_port: "59002"
|
||||
# The host port binding for https can be explicitly specified. It is
|
||||
# dynamic unless otherwise specified.
|
||||
# This is not used by most people, most people use the *router* instead
|
||||
# of the localhost port.
|
||||
|
||||
# host_webserver_port: "59001"
|
||||
# The host port binding for the ddev-webserver can be explicitly specified. It is
|
||||
# dynamic unless otherwise specified.
|
||||
# This is not used by most people, most people use the *router* instead
|
||||
# of the localhost port.
|
||||
|
||||
# host_db_port: "59002"
|
||||
# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
|
||||
# unless explicitly specified.
|
||||
|
||||
# mailpit_http_port: "8025"
|
||||
# mailpit_https_port: "8026"
|
||||
# The Mailpit ports can be changed from the default 8025 and 8026
|
||||
|
||||
# host_mailpit_port: "8025"
|
||||
# The mailpit port is not normally bound on the host at all, instead being routed
|
||||
# through ddev-router, but it can be bound directly to localhost if specified here.
|
||||
|
||||
# webimage_extra_packages: [php7.4-tidy, php-bcmath]
|
||||
# Extra Debian packages that are needed in the webimage can be added here
|
||||
|
||||
# dbimage_extra_packages: [telnet,netcat]
|
||||
# Extra Debian packages that are needed in the dbimage can be added here
|
||||
|
||||
# use_dns_when_possible: true
|
||||
# If the host has internet access and the domain configured can
|
||||
# successfully be looked up, DNS will be used for hostname resolution
|
||||
# instead of editing /etc/hosts
|
||||
# Defaults to true
|
||||
|
||||
# project_tld: ddev.site
|
||||
# The top-level domain used for project URLs
|
||||
# The default "ddev.site" allows DNS lookup via a wildcard
|
||||
# If you prefer you can change this to "ddev.local" to preserve
|
||||
# pre-v1.9 behavior.
|
||||
|
||||
# ngrok_args: --basic-auth username:pass1234
|
||||
# Provide extra flags to the "ngrok http" command, see
|
||||
# https://ngrok.com/docs/ngrok-agent/config or run "ngrok http -h"
|
||||
|
||||
# disable_settings_management: false
|
||||
# If true, DDEV will not create CMS-specific settings files like
|
||||
# Drupal's settings.php/settings.ddev.php or TYPO3's additional.php
|
||||
# In this case the user must provide all such settings.
|
||||
|
||||
# You can inject environment variables into the web container with:
|
||||
# web_environment:
|
||||
# - SOMEENV=somevalue
|
||||
# - SOMEOTHERENV=someothervalue
|
||||
|
||||
# no_project_mount: false
|
||||
# (Experimental) If true, DDEV will not mount the project into the web container;
|
||||
# the user is responsible for mounting it manually or via a script.
|
||||
# This is to enable experimentation with alternate file mounting strategies.
|
||||
# For advanced users only!
|
||||
|
||||
# bind_all_interfaces: false
|
||||
# If true, host ports will be bound on all network interfaces,
|
||||
# not the localhost interface only. This means that ports
|
||||
# will be available on the local network if the host firewall
|
||||
# allows it.
|
||||
|
||||
# default_container_timeout: 120
|
||||
# The default time that DDEV waits for all containers to become ready can be increased from
|
||||
# the default 120. This helps in importing huge databases, for example.
|
||||
|
||||
#web_extra_exposed_ports:
|
||||
#- name: nodejs
|
||||
# container_port: 3000
|
||||
# http_port: 2999
|
||||
# https_port: 3000
|
||||
#- name: something
|
||||
# container_port: 4000
|
||||
# https_port: 4000
|
||||
# http_port: 3999
|
||||
# Allows a set of extra ports to be exposed via ddev-router
|
||||
# Fill in all three fields even if you don’t intend to use the https_port!
|
||||
# If you don’t add https_port, then it defaults to 0 and ddev-router will fail to start.
|
||||
#
|
||||
# The port behavior on the ddev-webserver must be arranged separately, for example
|
||||
# using web_extra_daemons.
|
||||
# For example, with a web app on port 3000 inside the container, this config would
|
||||
# expose that web app on https://<project>.ddev.site:9999 and http://<project>.ddev.site:9998
|
||||
# web_extra_exposed_ports:
|
||||
# - name: myapp
|
||||
# container_port: 3000
|
||||
# http_port: 9998
|
||||
# https_port: 9999
|
||||
|
||||
#web_extra_daemons:
|
||||
#- name: "http-1"
|
||||
# command: "/var/www/html/node_modules/.bin/http-server -p 3000"
|
||||
# directory: /var/www/html
|
||||
#- name: "http-2"
|
||||
# command: "/var/www/html/node_modules/.bin/http-server /var/www/html/sub -p 3000"
|
||||
# directory: /var/www/html
|
||||
|
||||
# override_config: false
|
||||
# By default, config.*.yaml files are *merged* into the configuration
|
||||
# But this means that some things can't be overridden
|
||||
# For example, if you have 'use_dns_when_possible: true'' you can't override it with a merge
|
||||
# and you can't erase existing hooks or all environment variables.
|
||||
# However, with "override_config: true" in a particular config.*.yaml file,
|
||||
# 'use_dns_when_possible: false' can override the existing values, and
|
||||
# hooks:
|
||||
# post-start: []
|
||||
# or
|
||||
# web_environment: []
|
||||
# or
|
||||
# additional_hostnames: []
|
||||
# can have their intended affect. 'override_config' affects only behavior of the
|
||||
# config.*.yaml file it exists in.
|
||||
|
||||
# Many DDEV commands can be extended to run tasks before or after the
|
||||
# DDEV command is executed, for example "post-start", "post-import-db",
|
||||
# "pre-composer", "post-composer"
|
||||
# See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more
|
||||
# information on the commands that can be extended and the tasks you can define
|
||||
# for them. Example:
|
||||
#hooks:
|
||||
# Un-comment to emit the WP CLI version after ddev start.
|
||||
# post-start:
|
||||
# - exec: wp cli version
|
||||
27
.gitignore
vendored
Normal file
27
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Application
|
||||
web/app/plugins/*
|
||||
!web/app/plugins/.gitkeep
|
||||
web/app/mu-plugins/*/
|
||||
web/app/themes/twentytwentyfour/
|
||||
web/app/upgrade
|
||||
web/app/uploads/*
|
||||
!web/app/uploads/.gitkeep
|
||||
web/app/cache/*
|
||||
|
||||
# WordPress
|
||||
web/wp
|
||||
web/.htaccess
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
|
||||
# Dotenv
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# Composer
|
||||
/vendor
|
||||
|
||||
# WP-CLI
|
||||
wp-cli.local.yml
|
||||
17
.prettierignore
Normal file
17
.prettierignore
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Tout sauf le thème
|
||||
web/app
|
||||
!web/app/themes
|
||||
|
||||
# Tout .ddev sauf la configuration
|
||||
.ddev/*
|
||||
!.ddev/config.yaml
|
||||
|
||||
# Composer
|
||||
composer.lock
|
||||
|
||||
# pnpm
|
||||
pnpm-lock.yaml
|
||||
|
||||
# Fichiers minifiés
|
||||
*.min.js
|
||||
*.min.css
|
||||
19
LICENSE.md
Normal file
19
LICENSE.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Copyright (c) Roots Software Foundation LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
62
README.md
Normal file
62
README.md
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<p align="center">
|
||||
<a href="https://roots.io/bedrock/">
|
||||
<img alt="Bedrock" src="https://cdn.roots.io/app/uploads/logo-bedrock.svg" height="100">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://packagist.org/packages/roots/bedrock">
|
||||
<img alt="Packagist Installs" src="https://img.shields.io/packagist/dt/roots/bedrock?label=projects%20created&colorB=2b3072&colorA=525ddc&style=flat-square">
|
||||
</a>
|
||||
|
||||
<a href="https://packagist.org/packages/roots/wordpress">
|
||||
<img alt="roots/wordpress Packagist Downloads" src="https://img.shields.io/packagist/dt/roots/wordpress?label=roots%2Fwordpress%20downloads&logo=roots&logoColor=white&colorB=2b3072&colorA=525ddc&style=flat-square">
|
||||
</a>
|
||||
|
||||
<img src="https://img.shields.io/badge/dynamic/json.svg?url=https://raw.githubusercontent.com/roots/bedrock/master/composer.json&label=wordpress&logo=roots&logoColor=white&query=$.require[%22roots/wordpress%22]&colorB=2b3072&colorA=525ddc&style=flat-square">
|
||||
|
||||
<a href="https://github.com/roots/bedrock/actions/workflows/ci.yml">
|
||||
<img alt="Build Status" src="https://img.shields.io/github/actions/workflow/status/roots/bedrock/ci.yml?branch=master&logo=github&label=CI&style=flat-square">
|
||||
</a>
|
||||
|
||||
<a href="https://twitter.com/rootswp">
|
||||
<img alt="Follow Roots" src="https://img.shields.io/badge/follow%20@rootswp-1da1f2?logo=twitter&logoColor=ffffff&message=&style=flat-square">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">WordPress boilerplate with Composer, easier configuration, and an improved folder structure</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://roots.io/bedrock/">Website</a> <a href="https://roots.io/bedrock/docs/installation/">Documentation</a> <a href="https://github.com/roots/bedrock/releases">Releases</a> <a href="https://discourse.roots.io/">Community</a>
|
||||
</p>
|
||||
|
||||
## Sponsors
|
||||
|
||||
Bedrock is an open source project and completely free to use. If you've benefited from our projects and would like to support our future endeavors, please consider [sponsoring Roots](https://github.com/sponsors/roots).
|
||||
|
||||
<div align="center">
|
||||
<a href="https://k-m.com/"><img src="https://cdn.roots.io/app/uploads/km-digital.svg" alt="KM Digital" width="120" height="90"></a> <a href="https://carrot.com/"><img src="https://cdn.roots.io/app/uploads/carrot.svg" alt="Carrot" width="120" height="90"></a> <a href="https://wordpress.com/"><img src="https://cdn.roots.io/app/uploads/wordpress.svg" alt="WordPress.com" width="120" height="90"></a> <a href="https://worksitesafety.ca/careers/"><img src="https://cdn.roots.io/app/uploads/worksite-safety.svg" alt="Worksite Safety" width="120" height="90"></a> <a href="https://www.itineris.co.uk/"><img src="https://cdn.roots.io/app/uploads/itineris.svg" alt="Itineris" width="120" height="90"></a>
|
||||
</div>
|
||||
|
||||
## Overview
|
||||
|
||||
Bedrock is a WordPress boilerplate for developers that want to manage their projects with Git and Composer. Much of the philosophy behind Bedrock is inspired by the [Twelve-Factor App](http://12factor.net/) methodology, including the [WordPress specific version](https://roots.io/twelve-factor-wordpress/).
|
||||
|
||||
- Better folder structure
|
||||
- Dependency management with [Composer](https://getcomposer.org)
|
||||
- Easy WordPress configuration with environment specific files
|
||||
- Environment variables with [Dotenv](https://github.com/vlucas/phpdotenv)
|
||||
- Autoloader for mu-plugins (use regular plugins as mu-plugins)
|
||||
- Enhanced security (separated web root and secure passwords with [wp-password-bcrypt](https://github.com/roots/wp-password-bcrypt))
|
||||
|
||||
## Getting Started
|
||||
|
||||
See the [Bedrock installation documentation](https://roots.io/bedrock/docs/installation/).
|
||||
|
||||
## Stay Connected
|
||||
|
||||
- Join us on Discord by [sponsoring us on GitHub](https://github.com/sponsors/roots)
|
||||
- Participate on [Roots Discourse](https://discourse.roots.io/)
|
||||
- Follow [@rootswp on Twitter](https://twitter.com/rootswp)
|
||||
- Read the [Roots Blog](https://roots.io/blog/)
|
||||
- Subscribe to the [Roots Newsletter](https://roots.io/newsletter/)
|
||||
23
biome.jsonc
Normal file
23
biome.jsonc
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
|
||||
"files": {
|
||||
"ignore": [
|
||||
"*.min.js",
|
||||
"vendor",
|
||||
"web/wp",
|
||||
],
|
||||
"ignoreUnknown": true,
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": false,
|
||||
},
|
||||
"organizeImports": {
|
||||
"enabled": true,
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
},
|
||||
},
|
||||
}
|
||||
77
composer.json
Normal file
77
composer.json
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{
|
||||
"name": "roots/bedrock",
|
||||
"type": "project",
|
||||
"license": "MIT",
|
||||
"description": "WordPress boilerplate with Composer, easier configuration, and an improved folder structure",
|
||||
"homepage": "https://roots.io/bedrock/",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Scott Walkinshaw",
|
||||
"email": "scott.walkinshaw@gmail.com",
|
||||
"homepage": "https://github.com/swalkinshaw"
|
||||
},
|
||||
{
|
||||
"name": "Ben Word",
|
||||
"email": "ben@benword.com",
|
||||
"homepage": "https://github.com/retlehs"
|
||||
}
|
||||
],
|
||||
"keywords": [
|
||||
"bedrock",
|
||||
"composer",
|
||||
"roots",
|
||||
"wordpress",
|
||||
"wp",
|
||||
"wp-config"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/roots/bedrock/issues",
|
||||
"forum": "https://discourse.roots.io/category/bedrock"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "composer",
|
||||
"url": "https://wpackagist.org",
|
||||
"only": ["wpackagist-plugin/*", "wpackagist-theme/*"]
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=8.0",
|
||||
"composer/installers": "^2.2",
|
||||
"vlucas/phpdotenv": "^5.5",
|
||||
"oscarotero/env": "^2.1",
|
||||
"roots/bedrock-autoloader": "^1.0",
|
||||
"roots/bedrock-disallow-indexing": "^2.0",
|
||||
"roots/wordpress": "6.6.1",
|
||||
"roots/wp-config": "1.0.0",
|
||||
"roots/wp-password-bcrypt": "1.1.0",
|
||||
"wpackagist-theme/twentytwentyfour": "^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"squizlabs/php_codesniffer": "^3.7.1",
|
||||
"roave/security-advisories": "dev-latest"
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": "dist",
|
||||
"allow-plugins": {
|
||||
"composer/installers": true,
|
||||
"roots/wordpress-core-installer": true
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"extra": {
|
||||
"installer-paths": {
|
||||
"web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
|
||||
"web/app/plugins/{$name}/": ["type:wordpress-plugin"],
|
||||
"web/app/themes/{$name}/": ["type:wordpress-theme"]
|
||||
},
|
||||
"wordpress-install-dir": "web/wp"
|
||||
},
|
||||
"scripts": {
|
||||
"test": [
|
||||
"phpcs"
|
||||
]
|
||||
}
|
||||
}
|
||||
2039
composer.lock
generated
Normal file
2039
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
154
config/application.php
Normal file
154
config/application.php
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
<?php
|
||||
/**
|
||||
* Your base production configuration goes in this file. Environment-specific
|
||||
* overrides go in their respective config/environments/{{WP_ENV}}.php file.
|
||||
*
|
||||
* A good default policy is to deviate from the production config as little as
|
||||
* possible. Try to define as much of your configuration in this file as you
|
||||
* can.
|
||||
*/
|
||||
|
||||
use Roots\WPConfig\Config;
|
||||
use function Env\env;
|
||||
|
||||
// USE_ENV_ARRAY + CONVERT_* + STRIP_QUOTES
|
||||
Env\Env::$options = 31;
|
||||
|
||||
/**
|
||||
* Directory containing all of the site's files
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
$root_dir = dirname(__DIR__);
|
||||
|
||||
/**
|
||||
* Document Root
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
$webroot_dir = $root_dir . "/web";
|
||||
|
||||
/**
|
||||
* Use Dotenv to set required environment variables and load .env file in root
|
||||
* .env.local will override .env if it exists
|
||||
*/
|
||||
if (file_exists($root_dir . "/.env")) {
|
||||
$env_files = file_exists($root_dir . "/.env.local") ? [".env", ".env.local"] : [".env"];
|
||||
|
||||
$dotenv = Dotenv\Dotenv::createImmutable($root_dir, $env_files, false);
|
||||
|
||||
$dotenv->load();
|
||||
|
||||
$dotenv->required(["WP_HOME", "WP_SITEURL"]);
|
||||
if (!env("DATABASE_URL")) {
|
||||
$dotenv->required(["DB_NAME", "DB_USER", "DB_PASSWORD"]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up our global environment constant and load its config first
|
||||
* Default: production
|
||||
*/
|
||||
define("WP_ENV", env("WP_ENV") ?: "production");
|
||||
|
||||
/**
|
||||
* Infer WP_ENVIRONMENT_TYPE based on WP_ENV
|
||||
*/
|
||||
if (!env("WP_ENVIRONMENT_TYPE") && in_array(WP_ENV, ["production", "staging", "development", "local"])) {
|
||||
Config::define("WP_ENVIRONMENT_TYPE", WP_ENV);
|
||||
}
|
||||
|
||||
/**
|
||||
* URLs
|
||||
*/
|
||||
Config::define("WP_HOME", env("WP_HOME"));
|
||||
Config::define("WP_SITEURL", env("WP_SITEURL"));
|
||||
|
||||
/**
|
||||
* Custom Content Directory
|
||||
*/
|
||||
Config::define("CONTENT_DIR", "/app");
|
||||
Config::define("WP_CONTENT_DIR", $webroot_dir . Config::get("CONTENT_DIR"));
|
||||
Config::define("WP_CONTENT_URL", Config::get("WP_HOME") . Config::get("CONTENT_DIR"));
|
||||
|
||||
/**
|
||||
* DB settings
|
||||
*/
|
||||
if (env("DB_SSL")) {
|
||||
Config::define("MYSQL_CLIENT_FLAGS", MYSQLI_CLIENT_SSL);
|
||||
}
|
||||
|
||||
Config::define("DB_NAME", env("DB_NAME"));
|
||||
Config::define("DB_USER", env("DB_USER"));
|
||||
Config::define("DB_PASSWORD", env("DB_PASSWORD"));
|
||||
Config::define("DB_HOST", env("DB_HOST") ?: "localhost");
|
||||
Config::define("DB_CHARSET", "utf8mb4");
|
||||
Config::define("DB_COLLATE", "");
|
||||
$table_prefix = env("DB_PREFIX") ?: "wp_";
|
||||
|
||||
if (env("DATABASE_URL")) {
|
||||
$dsn = (object) parse_url(env("DATABASE_URL"));
|
||||
|
||||
Config::define("DB_NAME", substr($dsn->path, 1));
|
||||
Config::define("DB_USER", $dsn->user);
|
||||
Config::define("DB_PASSWORD", isset($dsn->pass) ? $dsn->pass : null);
|
||||
Config::define("DB_HOST", isset($dsn->port) ? "{$dsn->host}:{$dsn->port}" : $dsn->host);
|
||||
}
|
||||
|
||||
/**
|
||||
* Authentication Unique Keys and Salts
|
||||
*/
|
||||
Config::define("AUTH_KEY", env("AUTH_KEY"));
|
||||
Config::define("SECURE_AUTH_KEY", env("SECURE_AUTH_KEY"));
|
||||
Config::define("LOGGED_IN_KEY", env("LOGGED_IN_KEY"));
|
||||
Config::define("NONCE_KEY", env("NONCE_KEY"));
|
||||
Config::define("AUTH_SALT", env("AUTH_SALT"));
|
||||
Config::define("SECURE_AUTH_SALT", env("SECURE_AUTH_SALT"));
|
||||
Config::define("LOGGED_IN_SALT", env("LOGGED_IN_SALT"));
|
||||
Config::define("NONCE_SALT", env("NONCE_SALT"));
|
||||
|
||||
/**
|
||||
* Custom Settings
|
||||
*/
|
||||
Config::define("AUTOMATIC_UPDATER_DISABLED", true);
|
||||
Config::define("DISABLE_WP_CRON", env("DISABLE_WP_CRON") ?: false);
|
||||
|
||||
// Disable the plugin and theme file editor in the admin
|
||||
Config::define("DISALLOW_FILE_EDIT", true);
|
||||
|
||||
// Disable plugin and theme updates and installation from the admin
|
||||
Config::define("DISALLOW_FILE_MODS", true);
|
||||
|
||||
// Limit the number of post revisions
|
||||
Config::define("WP_POST_REVISIONS", env("WP_POST_REVISIONS") ?? true);
|
||||
|
||||
/**
|
||||
* Debugging Settings
|
||||
*/
|
||||
Config::define("WP_DEBUG_DISPLAY", false);
|
||||
Config::define("WP_DEBUG_LOG", false);
|
||||
Config::define("SCRIPT_DEBUG", false);
|
||||
ini_set("display_errors", "0");
|
||||
|
||||
/**
|
||||
* Allow WordPress to detect HTTPS when used behind a reverse proxy or a load balancer
|
||||
* See https://codex.wordpress.org/Function_Reference/is_ssl#Notes
|
||||
*/
|
||||
if (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && $_SERVER["HTTP_X_FORWARDED_PROTO"] === "https") {
|
||||
$_SERVER["HTTPS"] = "on";
|
||||
}
|
||||
|
||||
$env_config = __DIR__ . "/environments/" . WP_ENV . ".php";
|
||||
|
||||
if (file_exists($env_config)) {
|
||||
require_once $env_config;
|
||||
}
|
||||
|
||||
Config::apply();
|
||||
|
||||
/**
|
||||
* Bootstrap WordPress
|
||||
*/
|
||||
if (!defined("ABSPATH")) {
|
||||
define("ABSPATH", $webroot_dir . "/wp/");
|
||||
}
|
||||
20
config/environments/development.php
Normal file
20
config/environments/development.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* Configuration overrides for WP_ENV === 'development'
|
||||
*/
|
||||
|
||||
use Roots\WPConfig\Config;
|
||||
use function Env\env;
|
||||
|
||||
Config::define("SAVEQUERIES", true);
|
||||
Config::define("WP_DEBUG", true);
|
||||
Config::define("WP_DEBUG_DISPLAY", true);
|
||||
Config::define("WP_DEBUG_LOG", env("WP_DEBUG_LOG") ?? true);
|
||||
Config::define("WP_DISABLE_FATAL_ERROR_HANDLER", true);
|
||||
Config::define("SCRIPT_DEBUG", true);
|
||||
Config::define("DISALLOW_INDEXING", true);
|
||||
|
||||
ini_set("display_errors", "1");
|
||||
|
||||
// Enable plugin and theme updates and installation from the admin
|
||||
Config::define("DISALLOW_FILE_MODS", false);
|
||||
17
config/environments/staging.php
Normal file
17
config/environments/staging.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
/**
|
||||
* Configuration overrides for WP_ENV === 'staging'
|
||||
*/
|
||||
|
||||
use Roots\WPConfig\Config;
|
||||
|
||||
/**
|
||||
* You should try to keep staging as close to production as possible. However,
|
||||
* should you need to, you can always override production configuration values
|
||||
* with `Config::define`.
|
||||
*
|
||||
* Example: `Config::define('WP_DEBUG', true);`
|
||||
* Example: `Config::define('DISALLOW_FILE_MODS', false);`
|
||||
*/
|
||||
|
||||
Config::define("DISALLOW_INDEXING", true);
|
||||
28
dprint.json
Normal file
28
dprint.json
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"excludes": ["**/node_modules", "**/pnpm-lock.yaml"],
|
||||
"exec": {
|
||||
"cacheKey": "1",
|
||||
"commands": [
|
||||
{
|
||||
"command": "prettier --write --stdin-filepath {{file_path}}",
|
||||
"exts": ["php"]
|
||||
}
|
||||
],
|
||||
"cwd": "${configDir}",
|
||||
"indentWidth": 2,
|
||||
"lineWidth": 120,
|
||||
"timeout": 30,
|
||||
"useTabs": false
|
||||
},
|
||||
"extends": "/home/gcch/.dprint.jsonc",
|
||||
"plugins": [
|
||||
"https://plugins.dprint.dev/typescript-0.91.6.wasm",
|
||||
"https://plugins.dprint.dev/json-0.19.3.wasm",
|
||||
"https://plugins.dprint.dev/markdown-0.17.2.wasm",
|
||||
"https://plugins.dprint.dev/toml-0.6.2.wasm",
|
||||
"https://plugins.dprint.dev/g-plane/malva-v0.6.0.wasm",
|
||||
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.11.0.wasm",
|
||||
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.4.0.wasm",
|
||||
"https://plugins.dprint.dev/exec-0.5.0.json@8d9972eee71fa1590e04873540421f3eda7674d0f1aae3d7c788615e7b7413d0"
|
||||
]
|
||||
}
|
||||
33
justfile
Normal file
33
justfile
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
set shell := ["fish", "-c"]
|
||||
|
||||
cacheFolder := ".cache"
|
||||
eslintCacheFile := "eslintcache"
|
||||
prettierCacheFile := "prettiercache"
|
||||
stylelintCacheFile := "stylelintcache"
|
||||
|
||||
# Liste toutes les recettes
|
||||
list:
|
||||
@just --list --list-heading 'Recettes disponibles :'\n'' --unsorted
|
||||
|
||||
# Démarre le conteneur ddev
|
||||
start:
|
||||
ddev start
|
||||
|
||||
# Arrête le conteneur ddev
|
||||
stop:
|
||||
ddev stop
|
||||
|
||||
# Met à jour les dépendances composer et npm
|
||||
update:
|
||||
composer update
|
||||
pnpm update --latest
|
||||
|
||||
# Formatte avec Prettier et dprint
|
||||
format:
|
||||
@echo "Formatage de l'ensemble du code avec Prettier et dprint."
|
||||
pnpm prettier --cache \
|
||||
--cache-location "{{ cacheFolder }}/{{ prettierCacheFile }}" \
|
||||
-u \
|
||||
--write \
|
||||
.
|
||||
dprint fmt
|
||||
22
package.json
Normal file
22
package.json
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "haikuatelier.fr",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"main": "index.js",
|
||||
"keywords": [],
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@awmottaz/prettier-plugin-void-html": "^1.6.1",
|
||||
"@biomejs/biome": "1.8.3",
|
||||
"@prettier/plugin-php": "^0.22.2",
|
||||
"@zackad/prettier-plugin-twig-melody": "^0.6.0",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier-plugin-pkg": "^0.18.1",
|
||||
"prettier-plugin-sh": "^0.14.0"
|
||||
}
|
||||
}
|
||||
24
phpcs.xml
Normal file
24
phpcs.xml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset name="Roots">
|
||||
<description>Roots Coding Standards</description>
|
||||
|
||||
<!-- Scan all files in directory -->
|
||||
<file>.</file>
|
||||
|
||||
<!-- Scan only PHP files -->
|
||||
<arg name="extensions" value="php"/>
|
||||
|
||||
<!-- Ignore WordPress and Composer dependencies -->
|
||||
<exclude-pattern>web/wp</exclude-pattern>
|
||||
<exclude-pattern>web/app/themes/twentytwentyfour/</exclude-pattern>
|
||||
<exclude-pattern>vendor/</exclude-pattern>
|
||||
|
||||
<!-- Show colors in console -->
|
||||
<arg value="-colors"/>
|
||||
|
||||
<!-- Show sniff codes in all reports -->
|
||||
<arg value="ns"/>
|
||||
|
||||
<!-- Use PSR-2 as a base -->
|
||||
<rule ref="PSR2"/>
|
||||
</ruleset>
|
||||
54
prettier.config.js
Normal file
54
prettier.config.js
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
// @ts-check
|
||||
|
||||
/** @type {import("prettier").Config} */
|
||||
export default {
|
||||
arrowParens: "avoid",
|
||||
bracketSameLine: false,
|
||||
bracketSpacing: true,
|
||||
embeddedLanguageFormatting: "auto",
|
||||
endOfLine: "lf",
|
||||
experimentalTernaries: true,
|
||||
htmlWhitespaceSensitivity: "ignore",
|
||||
overrides: [
|
||||
// Pour les fichiers PHP sans HTML
|
||||
{
|
||||
files: ["*.php"],
|
||||
options: {
|
||||
braceStyle: "1tbs",
|
||||
parser: "php",
|
||||
phpVersion: "8.2",
|
||||
plugins: ["@prettier/plugin-php"],
|
||||
trailingCommaPHP: true,
|
||||
},
|
||||
},
|
||||
// Pour les modèles Twig
|
||||
{
|
||||
files: ["*.twig"],
|
||||
options: {
|
||||
plugins: ["@zackad/prettier-plugin-twig-melody"],
|
||||
twigAlwaysBreakObjects: false,
|
||||
twigFollowOfficialCodingStandards: true,
|
||||
twigOutputEndblockName: true,
|
||||
twigPrintWidth: 120,
|
||||
twigSingleQuote: false,
|
||||
},
|
||||
},
|
||||
// package.json
|
||||
{
|
||||
files: ["package.json"],
|
||||
options: {
|
||||
plugins: ["prettier-plugin-pkg"],
|
||||
},
|
||||
},
|
||||
],
|
||||
plugins: ["prettier-plugin-sh"],
|
||||
printWidth: 120,
|
||||
proseWrap: "never",
|
||||
quoteProps: "as-needed",
|
||||
semi: true,
|
||||
singleAttributePerLine: true,
|
||||
singleQuote: false,
|
||||
tabWidth: 2,
|
||||
trailingComma: "all",
|
||||
useTabs: false,
|
||||
};
|
||||
16
web/app/mu-plugins/bedrock-autoloader.php
Normal file
16
web/app/mu-plugins/bedrock-autoloader.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
/**
|
||||
* Plugin Name: Bedrock Autoloader
|
||||
* Plugin URI: https://github.com/roots/bedrock-autoloader
|
||||
* Description: An autoloader that enables standard plugins to be required just like must-use plugins. The autoloaded plugins are included during mu-plugin loading. An asterisk (*) next to the name of the plugin designates the plugins that have been autoloaded.
|
||||
* Version: 1.0.3
|
||||
* Author: Roots
|
||||
* Author URI: https://roots.io/
|
||||
* License: MIT License
|
||||
*/
|
||||
|
||||
namespace Roots\Bedrock;
|
||||
|
||||
if (is_blog_installed() && class_exists(Autoloader::class)) {
|
||||
new Autoloader();
|
||||
}
|
||||
0
web/app/plugins/.gitkeep
Normal file
0
web/app/plugins/.gitkeep
Normal file
0
web/app/themes/.gitkeep
Normal file
0
web/app/themes/.gitkeep
Normal file
0
web/app/uploads/.gitkeep
Normal file
0
web/app/uploads/.gitkeep
Normal file
6
web/index.php
Normal file
6
web/index.php
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* WordPress View Bootstrapper
|
||||
*/
|
||||
define("WP_USE_THEMES", true);
|
||||
require __DIR__ . "/wp/wp-blog-header.php";
|
||||
11
web/wp-config.php
Normal file
11
web/wp-config.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
/**
|
||||
* Do not edit this file. Edit the config files found in the config/ dir instead.
|
||||
* This file is required in the root directory so WordPress can find it.
|
||||
* WP is hardcoded to look in its own directory or one directory up for wp-config.php.
|
||||
*/
|
||||
require_once dirname(__DIR__) . "/vendor/autoload.php";
|
||||
require_once dirname(__DIR__) . "/config/application.php";
|
||||
require_once ABSPATH . "wp-settings.php";
|
||||
|
||||
// wp-config-ddev.php not needed
|
||||
3
wp-cli.yml
Normal file
3
wp-cli.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
path: web/wp
|
||||
server:
|
||||
docroot: web
|
||||
Loading…
Add table
Add a link
Reference in a new issue