Set directories for search

This commit is contained in:
Bob Mottram 2017-07-28 15:17:49 +01:00
parent 3609e4c952
commit 810e346f69
1 changed files with 3 additions and 3 deletions

View File

@ -65,6 +65,7 @@ function ghost_replace_jquery {
sed -i "s|http://code.jquery.com/jquery.js|$curr_domain/jquery-${jquery_version}.js|g" current/node_modules/jsdom/README.md
sed -i "s|https://code.jquery.com/jquery.js|$curr_domain/jquery-${jquery_version}.js|g" current/node_modules/jsdom/README.md
cd /var/www/${GHOST_DOMAIN_NAME}/htdocs/current
find ./ -type f -exec sed -i -e 's|https://code.jquery.com|$curr_domain|g' {} \;
find ./ -type f -exec sed -i -e 's|http://code.jquery.com|$curr_domain|g' {} \;
}
@ -76,13 +77,14 @@ function ghost_remove_offsite_links {
fi
# remove google font links
cd /var/www/$GHOST_DOMAIN_NAME/htdocs
cd /var/www/$GHOST_DOMAIN_NAME/htdocs/current
find ./ -type f -exec sed -i -e 's/fonts.googleapis.com/$curr_domain/g' {} \;
# copy jquery locally
previous_jquery_version='1.12.0'
jquery_version='1.12.4'
if [ ! -f /var/www/$GHOST_DOMAIN_NAME/htdocs/jquery-${jquery_version}.js ]; then
cd /var/www/$GHOST_DOMAIN_NAME/htdocs
wget https://code.jquery.com/jquery-${jquery_version}.js
jquery_hash=$(sha256sum jquery-${jquery_version}.js | awk -F ' ' '{print $1}')
if [[ "$jquery_hash" != '430f36f9b5f21aae8cc9dca6a81c4d3d84da5175eaedcf2fdc2c226302cb3575' ]]; then
@ -120,8 +122,6 @@ function ghost_replace_proprietary_services {
}
function ghost_replace_services {
ghost_replace_proprietary_services /var/www/${GHOST_DOMAIN_NAME}/htdocs/core/built/assets/ghost.js
ghost_replace_proprietary_services /var/www/${GHOST_DOMAIN_NAME}/htdocs/core/built/assets/ghost.min.js
ghost_replace_proprietary_services /var/www/${GHOST_DOMAIN_NAME}/htdocs/content/themes/casper/post.hbs
}