{%- assign sectionNames = page.url | split: "/" -%} {%- assign sectionName = sectionNames[1] | capitalize -%} {%- assign currentSlug = sectionNames | last -%} {%- assign currentIntegration = site.data.catalog.destinations.items | where: "slug", currentSlug | first -%} {%- assign description = "The technical documentation for Segment." -%} {%- assign priority = 2 -%} {%- assign basehref = "/docs" -%} {%- if page.path contains "index.md" -%} {%- capture basehref -%}{{basehref}}{{ page.url }}{%- endcapture -%} {%- else -%} {%- assign crumbs = page.url | split: '/' -%} {%- assign stoppingpoint = crumbs | size | minus: 1 -%} {%- for crumb in crumbs limit:stoppingpoint -%} {%- capture basehref -%}{{basehref}}{{ crumb }}/{%- endcapture -%} {%- endfor -%} {%- endif -%} {%- if page.integration_type == "destination" -%} {%- assign description = currentIntegration.description -%} {%- assign priority = 4 -%} {%- elsif page.integration_type == "source" -%} {%- assign description = currentIntegration.description -%} {%- assign priority = 4 -%} {%- endif -%}