diff --git a/scripts/ci/jobs/web-deploy.yml b/scripts/ci/jobs/web-deploy.yml index d39ffd1c8604ecfc0b7cc9883f2a017e1498a2cb..eed44f4257ece8ce2f938a613f48c2f8383856d1 100644 --- a/scripts/ci/jobs/web-deploy.yml +++ b/scripts/ci/jobs/web-deploy.yml @@ -25,7 +25,6 @@ deploy web site: - yarn - yarn build - netlify deploy --prod --dir=public --site=$OGS_NETLIFY_SITE_ID - - yarn upload-index cache: paths: - web/node_modules diff --git a/web/assets/css/main.css b/web/assets/css/main.css index a19577309017b4236bcf41243d1a941f77d82b40..4261a41f8b7e7a8c1d7b53c20a18f753932d72a6 100644 --- a/web/assets/css/main.css +++ b/web/assets/css/main.css @@ -220,41 +220,6 @@ img[src$='#two-third'] { align-items: center; } -/* -------------------------------- Algolia---------------------------------- */ -.algolia-autocomplete .aa-input, -.algolia-autocomplete .aa-hint { - width: 100%; -} - -.algolia-autocomplete .aa-hint { - color: #999; -} - -.algolia-autocomplete .aa-dropdown-menu { - @apply bg-gray-100; - @apply border-2; - @apply border-t-0; - @apply p-1; - @apply text-sm; - right: 0px; - width: 100%; - margin-top: -1px; -} - -.algolia-autocomplete .aa-dropdown-menu .aa-suggestion { - @apply cursor-pointer; - @apply p-1; -} - -.algolia-autocomplete .aa-dropdown-menu .aa-suggestion.aa-cursor { - @apply bg-brand-200; -} - -.algolia-autocomplete .aa-dropdown-menu .aa-suggestion em { - @apply font-bold; - @apply text-yellow-500; -} - /* ------------------------------- Jupyter --------------------------------- */ .jupyter-input pre { @apply border-l-4; diff --git a/web/assets/js/sitesearch.js b/web/assets/js/sitesearch.js index 03ff46e34a4957f23ab80dc478133bc1ab44dbbc..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 --- a/web/assets/js/sitesearch.js +++ b/web/assets/js/sitesearch.js @@ -1,41 +1 @@ -// Roughly based on https://github.com/algolia/autocomplete.js#jquery -// https://github.com/algolia/autocomplete.js/blob/master/LICENSE -var client = algoliasearch('4AHEU3QJQG', 'cda2754fe35733ffa31994a177725640') -var index = client.initIndex('docs.opengeosys.org'); -$('#search-input').autocomplete({ - autoselect: true, - hint: false, - keyboardShortcuts: ['s'] -}, [ - { - source: $.fn.autocomplete.sources.hits(index, { hitsPerPage: 5 }), - displayKey: 'title', - debug: true, - templates: { - suggestion: function (suggestion) { - return suggestion._highlightResult.title.value; - } - } - } -]).on('autocomplete:selected', function (event, suggestion, dataset) { - window.location = "/" + suggestion.uri.toLowerCase(); -}); - -$('#search-input-mobile').autocomplete({ - autoselect: true, - hint: false, - keyboardShortcuts: ['s'] -}, [ - { - source: $.fn.autocomplete.sources.hits(index, { hitsPerPage: 5 }), - displayKey: 'title', - templates: { - suggestion: function (suggestion) { - return suggestion._highlightResult.title.value; - } - } - } -]).on('autocomplete:selected', function (event, suggestion, dataset) { - window.location = "/" + suggestion.uri.toLowerCase(); -}); diff --git a/web/config.yaml b/web/config.yaml deleted file mode 100644 index 54a8266ccffa57d120475f720389c6e3eafdcd4e..0000000000000000000000000000000000000000 --- a/web/config.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# This file should not be necessary. -# Workaround for https://github.com/10Dimensional/hugo-algolia/issues/7 -algolia: - index: "docs.opengeosys.org" - # key supplied via $ALGOLIA_WRITE_KEY - appID: "4AHEU3QJQG" diff --git a/web/content/docs/devguide/documentation/web-docs/index.md b/web/content/docs/devguide/documentation/web-docs/index.md index 9e5be0166b7a757ac2a940cf55e1304469b21807..fa28093152214e14002fe3b24edf9fa43db8cf0c 100644 --- a/web/content/docs/devguide/documentation/web-docs/index.md +++ b/web/content/docs/devguide/documentation/web-docs/index.md @@ -147,7 +147,7 @@ This yaml-file is then used by the shortcode. ### Update search index ```bash -ALGOLIA_WRITE_KEY=XXX node_modules/.bin/hugo-algolia --toml -s +TODO: ``` ### Used components @@ -156,4 +156,3 @@ ALGOLIA_WRITE_KEY=XXX node_modules/.bin/hugo-algolia --toml -s - [Tailwind](https://tailwindcss.com/docs/what-is-tailwind) - CSS framework - [FontAwesome](https://fontawesome.com) - Icons, see [icon search](https://fontawesome.com/icons?d=gallery) - [Slick Carousel](http://kenwheeler.github.io/slick/) & [FancyBox](https://fancyapps.com/fancybox/3/) for image galleries -- [Algolia](https://github.com/algolia/algoliasearch-client-javascript) for site search diff --git a/web/layouts/partials/footer.html b/web/layouts/partials/footer.html index 2eeed3241832e4e22476d4acba3c3a04d53ef7e8..a26c349f795c56ecd14de9a61ad598cb615255c9 100644 --- a/web/layouts/partials/footer.html +++ b/web/layouts/partials/footer.html @@ -1,7 +1,5 @@ -<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" - crossorigin="anonymous"></script> -<script src="https://cdn.jsdelivr.net/autocomplete.js/0/autocomplete.jquery.min.js"></script> -<script src="https://cdn.jsdelivr.net/algoliasearch/3/algoliasearchLite.min.js"></script> +<script src="https://code.jquery.com/jquery-3.3.1.min.js" + integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.10/dist/clipboard.min.js"></script> diff --git a/web/package.json b/web/package.json index b15691e5de5b3285e7fbb2acfab63951fc7d225d..16cf606ed55e236604d46d7c122e9a8d4ac55628 100644 --- a/web/package.json +++ b/web/package.json @@ -4,14 +4,12 @@ "build": "npx tailwindcss -o static/css/all.css -i assets/css/main.css -m && hugo", "watch": "npx tailwindcss -o static/css/all.css -i assets/css/main.css -m --watch", "server": "hugo server", - "index": "hugo-algolia -toml", - "upload-index": "hugo-algolia --toml -s" + "index": "TODO:" }, "devDependencies": { "@tailwindcss/aspect-ratio": "^0.4.0", "@tailwindcss/line-clamp": "=0.3.1", "@tailwindcss/typography": "=0.5.2", - "hugo-algolia": "=1.2.14", "tailwindcss": "=3.1.6" } }