mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
as we're not using the search suggestion feature only load the search_content when we have a search ?q= param
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
This commit is contained in:
parent
64f67af2b2
commit
60089ace48
2 changed files with 12 additions and 7 deletions
|
@ -90,7 +90,6 @@ upload_current_documentation() {
|
||||||
echo "Uploading $src"
|
echo "Uploading $src"
|
||||||
echo " to $dst"
|
echo " to $dst"
|
||||||
echo
|
echo
|
||||||
#s3cmd --recursive --follow-symlinks --preserve --acl-public sync "$src" "$dst"
|
|
||||||
|
|
||||||
# a really complicated way to send only the files we want
|
# a really complicated way to send only the files we want
|
||||||
# if there are too many in any one set, aws s3 sync seems to fall over with 2 files to go
|
# if there are too many in any one set, aws s3 sync seems to fall over with 2 files to go
|
||||||
|
@ -104,7 +103,7 @@ upload_current_documentation() {
|
||||||
$run
|
$run
|
||||||
|
|
||||||
# Make sure the search_content.json.gz file has the right content-encoding
|
# Make sure the search_content.json.gz file has the right content-encoding
|
||||||
aws s3 cp --profile $BUCKET --cache-control "max-age=3600" --content-encoding="gzip" --acl public-read "site/search_content.json.gz" "$dst"
|
aws s3 cp --profile $BUCKET --cache-control $cache --content-encoding="gzip" --acl public-read "site/search_content.json.gz" "$dst"
|
||||||
}
|
}
|
||||||
|
|
||||||
invalidate_cache() {
|
invalidate_cache() {
|
||||||
|
|
6
docs/theme/mkdocs/js/base.js
vendored
6
docs/theme/mkdocs/js/base.js
vendored
|
@ -45,11 +45,17 @@ $(document).ready(function ()
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function getURLP(name)
|
||||||
|
{
|
||||||
|
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20')) || null;
|
||||||
|
}
|
||||||
|
if (getURLP("q")) {
|
||||||
// Tipue Search activation
|
// Tipue Search activation
|
||||||
$('#tipue_search_input').tipuesearch({
|
$('#tipue_search_input').tipuesearch({
|
||||||
'mode': 'json',
|
'mode': 'json',
|
||||||
'contentLocation': '/search_content.json.gz'
|
'contentLocation': '/search_content.json.gz'
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue