add default options for Grav in Vagrant

This commit is contained in:
meaz 2019-12-28 12:43:50 +01:00
parent 662f84d572
commit 303d240ffb
1 changed files with 3 additions and 0 deletions

View File

@ -64,6 +64,9 @@ sudo -u "${WWW_USER}" sed -i '4d' "${WEB_ROOT}""${WEB_NAME}"/user/config/system.
sudo -u "${WWW_USER}" ex -s -c "4i| alias: '/home'" -c x "${WEB_ROOT}""${WEB_NAME}"/user/config/system.yaml
sudo -u "${WWW_USER}" -i 's/false/true/g' "${WEB_ROOT}""${WEB_NAME}"/user/plugins/language-selector/language-selector.yaml
# Add Grav config (the second extra false should be set to true, but it creates an error in Grav ("Trying to access array offset on value of type null")
sed -i "s/extra:\ false/\extra:\ false\n\ auto_line_breaks:\ true\n\ auto_url_links:\ true\n\ escape_markup:\ false\n\ special_chars:\n\ \'\>\':\ \'gt\'\n\ \'\<\':\ \'lt\'/" "${WEB_ROOT}""${WEB_NAME}"/user/config/system.yaml
# Add website domain to local /etc/hosts file
sudo sed -i "s/127.0.0.1\tlocalhost/127.0.0.1\tlocalhost $WEB_NAME/" /etc/hosts