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 6a02603de6..8c17b6d352 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-docs']; + const sectionLevel0s = ['blog', 'resources']; // Avoid loading too much data when on mobile. const tilesAlgoliaPreloadItems = isMobile() ? 12 : 30; diff --git a/_vendor/github.com/linode/linode-docs-theme/config.toml b/_vendor/github.com/linode/linode-docs-theme/config.toml index 45e0cea7e2..4567feb974 100644 --- a/_vendor/github.com/linode/linode-docs-theme/config.toml +++ b/_vendor/github.com/linode/linode-docs-theme/config.toml @@ -51,7 +51,7 @@ filtering_facets = [ [params.search_config2.sections] [params.search_config2.sections.products] name = "products" -weight = 10 # Used to order the sections in the UI. Higher comes first. +weight = 35 # 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/" @@ -62,7 +62,7 @@ explorer_icon = "#icon-explorer--products" [params.search_config2.sections.guides] name = "guides" filters = "section.lvl0:guides" -weight = 20 +weight = 10 title = "Cloud Guides & Tutorials" noun = "Guide" explorer_icon = "#icon-explorer--guides" @@ -72,21 +72,21 @@ name = "api" index = "linode-documentation-api" static_link_url = "https://techdocs.akamai.com/linode-api/reference/api" filters = "section.lvl0:api" -weight = 30 +weight = 40 title = "API" explorer_icon = "#icon-explorer--api" [params.search_config2.sections.reference-architecture] name = "reference-architecture" filters = "section.lvl0:guides" -weight = 35 -title = "Reference Architecture" +weight = 20 +title = "Reference Architectures" noun = "Reference" explorer_icon = "#icon-explorer--reference-architecture" [params.search_config2.sections.marketplace-docs] name = "marketplace-docs" -weight = 40 +weight = 25 title = "Marketplace Docs" noun = "Marketplace" filters = "section.lvl0:marketplace-docs" @@ -107,8 +107,8 @@ static_link_url = "https://www.linode.com/blog/" name = "resources" filters = "section.lvl0:Resources" weight = 60 -title = "Resources" -noun = "Resource" +title = "Content Resources" +noun = "Content Resource" seo_title_template = "Cloud Computing Resources | Linode" seo_title_template_category = "Cloud Computing {category} | Linode" explorer_icon = "#icon-explorer--resources" diff --git a/_vendor/github.com/linode/linode-docs-theme/content/headless/home/data_v2.toml b/_vendor/github.com/linode/linode-docs-theme/content/headless/home/data_v2.toml new file mode 100644 index 0000000000..0d45308494 --- /dev/null +++ b/_vendor/github.com/linode/linode-docs-theme/content/headless/home/data_v2.toml @@ -0,0 +1,11 @@ +hero_text = "Developer resources for building on Akamai Connected Cloud" + +# Ordered list of section to display cards with the last 3 articles. +cards_sections = ["guides", "reference-architecture", "marketplace-docs"] + +[cards_now_on_tech_docs] + title = "Now on Akamai TechDocs" + cards = [ + { title = "Product docs", href = "https://techdocs.akamai.com/cloud-computing/docs/" }, + { title = "Linode API reference", href = "https://techdocs.akamai.com/linode-api/reference/api" }, + ] diff --git a/_vendor/github.com/linode/linode-docs-theme/content/testpages/links.md b/_vendor/github.com/linode/linode-docs-theme/content/testpages/links.md index 9f5b8156e4..7d91aa9a1f 100644 --- a/_vendor/github.com/linode/linode-docs-theme/content/testpages/links.md +++ b/_vendor/github.com/linode/linode-docs-theme/content/testpages/links.md @@ -3,6 +3,21 @@ title: Testing Links description: This is a test page used in both manual and automatic tests. Do not delete. It will not be listed anywhere. --- +## Cool Links + +### With Markdown text and title set + +[Reprehenderit esse quis occaecat adipisicing aliquip. Dolor veniam **cupidatat cillum nulla** reprehenderit incididunt dolor in elit adipisicing. Sint incididunt non irure magna ipsum amet nulla aliqua nostrud laboris pariatur cillum eiusmod magna.](/docs/products/compute/kubernetes/guides/kubectl/?cardstyling "Link to Kubectl") + + +[Just a test link with additional params.](/docs/products/compute/kubernetes/guides/kubectl/?foo=bar&cardstyling "Link to Kubectl") + + +### Without Markdown text and title + +[](/docs/products/compute/kubernetes/guides/kubectl/?cardstyling) + +[](/docs/guides/preparing-infrastructure-for-high-impact-ad-traffic/?cardstyling) ## Links to Anchor Links 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 431a7f220a..2d1638cf2f 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,49 +1,103 @@ {{ $isTest := or (not (not hugo.IsServer)) (site.Params.TestEnv ) }} {{- $link := .Destination -}} {{- $isRemote := strings.Contains $link "://" -}} +{{- $isCard := false -}} {{- $fragment := "" -}} +{{- $page := "" -}} {{- if not $isRemote -}} -{{- $url := urls.Parse .Destination -}} -{{- $fragment = $url.Fragment -}} -{{ $path := "" }} -{{- if and (not $isRemote) $isTest $url.Path -}} - {{/* Check that the target exists. */}} + {{- $url := urls.Parse .Destination -}} + {{- $fragment = $url.Fragment -}} + {{- if $url.Query.Has "cardstyling" }} + {{- $isCard = true -}} + {{- $params := slice -}} + {{- range $k, $v := $url.Query -}} + {{- if ne $k "cardstyling" -}} + {{- $params = $params | append (slice $k ($url.Query.Get $k)) -}} + {{- end -}} + {{- end -}} + {{- $link = $url.Path -}} + {{- with $params -}} + {{- $link = printf "%s?%s" $link (collections.Querify .) -}} + {{ end }} + {{- end -}} {{- $m := partialCached "funcs/get-linkmap.html" "-" -}} - {{ $path = $url.Path}} - {{ $destination := .Destination }} - {{ $hasDot := strings.Contains $path "." }} - {{ if and (not $hasDot) (not (strings.HasSuffix $path "/")) }} - {{ $path = printf "%s/" $path }} - {{ end }} - {{ $ok := true }} - {{ $reason := "" }} - {{- $page := index $m.links $path -}} - {{- if $page -}} - {{/* Page found OK, check for fragment match. */}} - {{- with $url.Fragment }} - {{/* The API section isn't built from Markdown. */}} - {{ if not (eq $page.Section "api") }} - {{ if not ($page.Fragments.Identifiers.Contains .) }} - {{ $ok = false }} - {{ $reason = "Fragment not found" }} + {{- $path := $url.Path -}} + {{- $hasDot := strings.Contains $path "." -}} + {{- if and (not $hasDot) (not (strings.HasSuffix $path "/")) -}} + {{- $path = printf "%s/" $path -}} + {{- end -}} + {{- $page = index $m.links $path -}} + {{- if and (not $isRemote) $isTest $url.Path -}} + {{- $m := partialCached "funcs/get-linkmap.html" "-" -}} + {{ $path = $url.Path }} + {{ $hasDot := strings.Contains $path "." }} + {{ if and (not $hasDot) (not (strings.HasSuffix $path "/")) }} + {{ $path = printf "%s/" $path }} + {{ end }} + {{- $page := index $m.links $path -}} + {{ $ok := true }} + {{ $reason := "" }} + {{- if $page -}} + {{/* Page found OK, check for fragment match. */}} + {{- with $url.Fragment }} + {{/* The API section isn't built from Markdown. */}} + {{ if not (eq $page.Section "api") }} + {{ if not ($page.Fragments.Identifiers.Contains .) }} + {{ $ok = false }} + {{ $reason = "Fragment not found" }} + {{ end }} {{ end }} + {{ end -}} + {{ else }} + {{ $ok = false }} + {{ $reason = "Not found" }} + {{ end }} + {{ if not $ok }} + {{/* Store it away so we can build a report later. */}} + {{ if not (strings.HasPrefix $path "/") }} + {{ $path = path.Join $.Page.RelPermalink $path }} {{ end }} - {{ end -}} - {{ else }} - {{ $ok = false }} - {{ $reason = "Not found" }} - {{ end }} - {{ if not $ok }} - {{/* Store it away so we can build a report later. */}} - {{ if not (strings.HasPrefix $path "/") }} - {{ $path = path.Join $.Page.RelPermalink $path }} + {{ $path = strings.TrimPrefix "/docs" $path }} + {{ $m := dict "link" .Destination "path" $path "fragment" $fragment "reason" $reason "sourceRef" $.Page.RelPermalink "source" $.Page "target" $page }} + {{ site.Home.Store.SetInMap "brokenlinks" .Destination $m }} + {{ else }} + {{ site.Home.Store.DeleteInMap "brokenlinks" .Destination }} {{ end }} - {{ $path = strings.TrimPrefix "/docs" $path }} - {{ $m := dict "link" .Destination "path" $path "fragment" $fragment "reason" $reason "sourceRef" $.Page.RelPermalink "source" $.Page "target" $page }} - {{ site.Home.Store.SetInMap "brokenlinks" .Destination $m }} - {{ else }} - {{ site.Home.Store.DeleteInMap "brokenlinks" .Destination }} - {{ end }} + {{- end -}} {{- end -}} +{{- if $isCard -}} + {{ template "render-card-link" (dict "dot" . "link" $link "page" $page ) }} +{{- else -}} + {{ .Text | safeHTML }} {{- end -}} -{{ .Text | safeHTML }} \ No newline at end of file +{{ define "render-card-link" }} + {{- $title := .dot.Title -}} + {{- $text := .dot.Text }} + {{- if .page -}} + {{- $title = .page.LinkTitle -}} + {{- end -}} + {{- if and .page .page.Params.description -}} + {{- $text = .page.Params.description | markdownify -}} + {{- end -}} + + +
+ +

+ {{ $title | safeHTML }} +

+

+ {{ $text | safeHTML }} +

+
+
+{{ end }} diff --git a/_vendor/github.com/linode/linode-docs-theme/layouts/_default/list.html b/_vendor/github.com/linode/linode-docs-theme/layouts/_default/list.html index b6bd615de9..5a689e784c 100644 --- a/_vendor/github.com/linode/linode-docs-theme/layouts/_default/list.html +++ b/_vendor/github.com/linode/linode-docs-theme/layouts/_default/list.html @@ -221,10 +221,9 @@