diff --git a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/explorer.js b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/explorer.js index 5dddc5483b3..6a213115992 100644 --- a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/explorer.js +++ b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/explorer.js @@ -131,6 +131,13 @@ export function newSearchExplorerHydrated(searchConfig) { let rootNodes = this.explorer.facets.filter( (n) => n.level === 1 && n.key !== 'bundles' && n.key != 'community', ); + + // Manually add the product section with count -1 to signal a static link. + rootNodes.push({ + key: 'products', + count: -1, + level: 1, + }); // Apply explorer_icon and weight from searchConfig.sections. rootNodes.forEach((n) => { let section = searchConfig.sections[n.key.toLowerCase()]; @@ -139,6 +146,9 @@ export function newSearchExplorerHydrated(searchConfig) { n.weight = section.weight; n.title = section.title; n.linkTitle = n.title; + if (section.static_link_url) { + n.static_link_url = section.static_link_url; + } } }); @@ -496,6 +506,9 @@ const updateFacetState = function (to, from) { let fromIndex = 0; for (let toIndex = 0; toIndex < to.length; toIndex++) { let toNode = to[toIndex]; + if (toNode.count < 0) { + continue; + } let fromNode = null; if (toIndex >= from.length) { let idx = from.findIndex((n) => n.href === toNode.href); diff --git a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/language-switcher.js b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/language-switcher.js index 7ce75b869b4..3bf51a68784 100644 --- a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/language-switcher.js +++ b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/navigation/language-switcher.js @@ -33,7 +33,7 @@ export function newLanguageSwitcherController(weglot_api_key) { ], init: function () { - console.log('init language'); + debug('init language'); const langParam = getCurrentLangFromLocation(); if (langParam) { this.currentLang = langParam; diff --git a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/search/search-store.js b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/search/search-store.js index 291039c3549..83339bc0762 100644 --- a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/search/search-store.js +++ b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/search/search-store.js @@ -119,6 +119,10 @@ export function newSearchStore(searchConfig, params, Alpine) { keyOpenStack: [], }, + docsearchLink: function () { + return `https://docsearch.akamai.com/s/global-search/${this.query.lndq}?s=Akamai%20TechDocs&ds=Akamai%20cloud%20computing`; + }, + shouldShowHydratedExplorer: function () { return this.explorer.showHydratedExplorer || this.query.isFiltered(); }, @@ -374,7 +378,7 @@ export function newSearchStore(searchConfig, params, Alpine) { let q = ''; // TODO(bep) we have removed the QA section from explorer/search, but the // data is still there. The docType filter below can be remove when we have completed the migration. - let filters = sectionConfig.filters || 'NOT docType:community'; + let filters = sectionConfig.filters || 'NOT docType:community AND NOT docType:products AND NOT docType:Marketplace'; let facetFilters = []; let attributesToHighlight = []; let analyticsTags = []; @@ -513,9 +517,9 @@ const normalizeResult = function (self, result) { if (k === 'docType' || k.startsWith('section.')) { let obj = {}; Object.entries(v).forEach(([kk, vv]) => { - // TODO(bep) we have removed the QA section from explorer/search, but the + // TODO(bep) we have removed the QA and products section from explorer/search, but the // data is still there. The docType filter below can be remove when we have completed the migration. - if (k == 'docType' && kk == 'community') { + if (k == 'docType' && (kk == 'community' || kk == 'products')) { return; } let m = self.metaProvider.getSectionMeta(kk.toLocaleLowerCase()); diff --git a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/sections/home/home.js b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/sections/home/home.js index ad6f4120a73..6a02603de65 100644 --- a/_vendor/github.com/linode/linode-docs-theme/assets/js/main/sections/home/home.js +++ b/_vendor/github.com/linode/linode-docs-theme/assets/js/main/sections/home/home.js @@ -16,7 +16,7 @@ export function newHomeController(searchConfig, staticData) { // The section we paginate on the home page. // This maps to section.lvl0 in linode-merged. - const sectionLevel0s = ['guides', 'blog', 'resources', 'marketplace']; + const sectionLevel0s = ['guides', 'blog', 'resources', 'marketplace-docs']; // Avoid loading too much data when on mobile. const tilesAlgoliaPreloadItems = isMobile() ? 12 : 30; @@ -35,7 +35,6 @@ export function newHomeController(searchConfig, staticData) { // It will scale down with page size. const tilesPageSize = 6; const tilesPageSizeMobile = 2; - const productsStripPageSize = 6; // Create a new pager for the given el and items. // pageSize is the number of items per page. @@ -204,19 +203,6 @@ export function newHomeController(searchConfig, staticData) { this.data.sectionTiles[name] = pager; }); - // Initialize the static carousels. - this.data.sectionTiles['products'] = newPager( - productsStripPageSize, - this.$refs[`carousel-products`], - staticData.productItems, - ); - // Make the developers pager the same size as the products pager. - this.data.sectionTiles['developers'] = newPager( - productsStripPageSize, - this.$refs[`carousel-developers`], - staticData.developerItems, - ); - this.loaded = true; }); }, diff --git a/_vendor/github.com/linode/linode-docs-theme/assets/json/search_cachewarmer_queries/explorer-blank.json b/_vendor/github.com/linode/linode-docs-theme/assets/json/search_cachewarmer_queries/explorer-blank.json index 6a326062020..61bd17d0ec1 100644 --- a/_vendor/github.com/linode/linode-docs-theme/assets/json/search_cachewarmer_queries/explorer-blank.json +++ b/_vendor/github.com/linode/linode-docs-theme/assets/json/search_cachewarmer_queries/explorer-blank.json @@ -2,5 +2,5 @@ "indexName": "linode-merged", "facets": ["section.*", "docType", "category", "tags"], "distinct": 1, - "filters": "NOT docType:community" + "filters": "NOT docType:community AND NOT docType:products AND NOT docType:Marketplace" } diff --git a/_vendor/github.com/linode/linode-docs-theme/config.toml b/_vendor/github.com/linode/linode-docs-theme/config.toml index 8296119a23e..4121ffa3c01 100644 --- a/_vendor/github.com/linode/linode-docs-theme/config.toml +++ b/_vendor/github.com/linode/linode-docs-theme/config.toml @@ -54,6 +54,7 @@ name = "products" weight = 10 # Used to order the sections in the UI. Higher comes first. title = "Products" noun = "Product Guide" +static_link_url = "https://techdocs.akamai.com/cloud-computing/docs/" filters = "section.lvl0:products" # The icons are fetched from layouts/sections/navigation/explorer-icons.html explorer_icon = "#icon-explorer--products" @@ -82,15 +83,12 @@ title = "Reference Architecture" noun = "Reference" explorer_icon = "#icon-explorer--reference-architecture" -[params.search_config2.sections.marketplace] -name = "marketplace" -index = "linode-wp" +[params.search_config2.sections.marketplace-docs] +name = "marketplace-docs" weight = 40 -title = "Marketplace" -seo_title_template = "One-Click App Marketplace | Linode" -seo_title_template_category = "One-Click App Marketplace | {category} | Linode" -noun = "App" -filters = "section.lvl0:Marketplace" +title = "Marketplace Docs" +noun = "Marketplace" +filters = "section.lvl0:marketplace-docs" explorer_icon = "#icon-explorer--marketplace" [params.search_config2.sections.blog] @@ -102,6 +100,7 @@ seo_title_template_category = "Linode Blog | {category} | Linode" noun = "Post" filters = "section.lvl0:Blog" explorer_icon = "#icon-explorer--blog" +static_link_url = "https://www.linode.com/blog/" [params.search_config2.sections.resources] name = "resources" @@ -112,6 +111,7 @@ noun = "Resource" seo_title_template = "Cloud Computing Resources | Linode" seo_title_template_category = "Cloud Computing {category} | Linode" explorer_icon = "#icon-explorer--resources" +static_link_url = "https://www.linode.com/content/" [module] [[module.mounts]] diff --git a/_vendor/github.com/linode/linode-docs-theme/layouts/_default/_markup/render-link.html b/_vendor/github.com/linode/linode-docs-theme/layouts/_default/_markup/render-link.html index 942c886a509..431a7f220af 100644 --- a/_vendor/github.com/linode/linode-docs-theme/layouts/_default/_markup/render-link.html +++ b/_vendor/github.com/linode/linode-docs-theme/layouts/_default/_markup/render-link.html @@ -1,4 +1,4 @@ -{{ $isTest := or (not (not site.IsServer)) (site.Params.TestEnv ) }} +{{ $isTest := or (not (not hugo.IsServer)) (site.Params.TestEnv ) }} {{- $link := .Destination -}} {{- $isRemote := strings.Contains $link "://" -}} {{- $fragment := "" -}} diff --git a/_vendor/github.com/linode/linode-docs-theme/layouts/_default/baseof.html b/_vendor/github.com/linode/linode-docs-theme/layouts/_default/baseof.html index 23159cc7747..08f404bebb3 100644 --- a/_vendor/github.com/linode/linode-docs-theme/layouts/_default/baseof.html +++ b/_vendor/github.com/linode/linode-docs-theme/layouts/_default/baseof.html @@ -12,7 +12,7 @@ {{/* Note that the TailwindCSS config is "scoped" by the ln-docs ID, so don't change it for no good reason. */}} - {{ if or site.IsServer (eq hugo.Environment "testing") }} + {{ if or hugo.IsServer (eq hugo.Environment "testing") }}