File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 11# Changelog for ` ddev-wp-setup-script `
22
3+ ## 1.3.1
4+
5+ _ 2024-11-24_
6+
7+ - Added the ` $PROJECT_TITLE ` variable.
8+ - Updated ` $WP_SITE_TITLE ` to use ` $PROJECT_TITLE ` variable.
9+
310## 1.3.0
411
512_ 2024-11-24_
Original file line number Diff line number Diff line change 11#! /bin/bash
22
33# Your WP site name
4- WP_SITE_TITLE=$PROJECT_NAME
4+ WP_SITE_TITLE=$PROJECT_TITLE
55
66# Your WP login details
77WP_USER_NAME=' example-name'
Original file line number Diff line number Diff line change @@ -4,9 +4,14 @@ MODULES_DIR="${SCRIPT_DIR}/modules"
44FILES_DIR=" ${SCRIPT_DIR} /files"
55PROJECT_DIR=$( pwd)
66
7- # Get the project name from the project directory,
8- # minus the any leading non-alphanumeric characters and trailing `.ddev.site`, if any .
7+ # Get the project name from the project directory, minus any leading
8+ # non-alphanumeric characters and trailing `.ddev.site`.
99PROJECT_NAME=$( basename " $PROJECT_DIR " | sed ' s:^[^a-zA-Z0-9]*::;s:\.ddev\.site$::' )
10+
11+ # Replace any $PROJECT_NAME hyphens with spaces and capitalize the first letter of each word.
12+ PROJECT_TITLE=$( echo " $PROJECT_NAME " | sed ' s/-/ /g' | sed ' s/\b\(.\)/\u\1/g' )
13+
14+ # Replace any $PROJECT_NAME spaces with hyphens and convert to lowercase.
1015PROJECT_NAME_SLUG=$( echo " $PROJECT_NAME " | sed ' s/[[:space:]]/-/g' | tr ' [:upper:]' ' [:lower:]' )
1116
1217# Terminal Base Colors
You can’t perform that action at this time.
0 commit comments