Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ Each piece of frontmatter does something special!
#### Content-related frontmatter
- `beta`: default false. When true, show an "in beta" warning in the page layout (see the warning in `_includes/content/beta-note.md`)
- `rewrite`: defaults to false. This is a legacy frontmatter flag that comes from the old `site-docs` repo, and which labels any destination that was rewritten in ~2018 to a standardized template. It disables the duplicate "connection modes" table that would otherwise show up in the boilerplate content at the end of the page.
- `hide-boilerplate`: defaults to false. When true, none of the content from `integration-foot.md` is appended to the destination page.
- `hide-boilerplate`: defaults to false. When true, none of the content from `destination-footer.md` is appended to the destination page.
- `hide-cmodes`: defaults to false. A renaming of "rewrite" for more clarity, hides the connection modes table in the boilerplate.
- `hide-personas-partial`: defaults to false. When true, hides the section of content from `integration-foot.md` that talks about being able to receive personas data.
- `hide-personas-partial`: defaults to false. When true, hides the section of content from `destination-footer.md` that talks about being able to receive personas data.
- `integration_type`: This is set in the `_config.yml` on three paths to add a noun (Source, Destination, or Warehouse) to the end of the title, and the end of the title tag in the html layout. It also controls the layout and icon for some of these.
- `source-type`: These are only used to supplement when a Cloud App in the sources path doesn't appear in the Config API list, and needs its type explicitly set. It runs some logic in the `cloud-app-note.md` to explain which cloud-apps are object vs event sources.

Expand Down
6 changes: 3 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ defaults:
path: "connections/destinations/catalog"
values:
integration_type: destination
layout: integration
layout: destination
- scope:
path: "connections/sources/catalog"
values:
integration_type: source
layout: integration
layout: source
- scope:
path: "connections/storage/catalog"
values:
Expand All @@ -53,4 +53,4 @@ algolia:
application_id: UINQ2M4D9S
index_name: segment-docs
files_to_exclude:
- _release_notes/*
- _release_notes/*
16 changes: 10 additions & 6 deletions devguide.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,19 @@ It also does some slugification and destination-name normalization, since our ha

### Layouts

`default.html` is the base container through which all the individual other layouts (currently one, `page.html`) are built to have the right title, seo, etc. `Integration.html` contains the logic that runs the catalog pages.
`default.html` is the base container through which all the individual other layouts are built to have the right title, seo, etc. The template inheritance is described in the diagram below.

The `destination.html`, `source.html`, and `integration.html` templates contain the logic that runs the layouts for individual catalog pages. Storage/warehouses use the generic Integration right now because they don't need anything special. Set the layout in the Jekyll `_config.yml` file.

```text
default.html
|- integration.html
|- catalog.html
|- main.html
|-page.html
|-home.html
|- integration.html
|- destination.html
|- source.html
|- main.html
|- catalog.html
|- home.html
|- page.html
```

### Platform Config API + Catalog
Expand Down
14 changes: 14 additions & 0 deletions src/_includes/content/destination-dossier.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- canary comment -->

<!-- in the file we're pulling from the API, "name" corresponds with the path to the yml blob for a specific destination.-->
{% assign currentSlug = page.url | split: "/" | last %}
{% assign currentIntegration = site.data.catalog.destinations.items | where: "slug", currentSlug | first %}
{% if currentIntegration %}
<!-- this endif prevents you from showing a dossier if there's no info in destinations.yml-->



<!-- TODO -->


{% endif %}
19 changes: 19 additions & 0 deletions src/_layouts/destination.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
layout: integration
---
<div class="markdown">

{% unless page.hide-dossier == true %}
{% capture destination-dossier %}{% include content/destination-dossier.md %}{% endcapture %}
{{ destination-dossier | markdownify }}
{% endunless %}


{{ content }}

{% unless page.hide-boilerplate == true %}
{% capture destination-footer %}{% include content/destination-footer.md %}{% endcapture %}
{{ destination-footer | markdownify }}
{% endunless %}

</div>
27 changes: 9 additions & 18 deletions src/_layouts/integration.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
{% include_cached navbar/logo.html %}
</div>

{% if page.strat %}
{% include menu/menu-strat.html %}
{% else %}
{% include_cached menu/menu-{{ page.integration_type }}.html %}
{% if page.strat %}
{% include menu/menu-strat.html %}
{% else %}
{% include_cached menu/menu-{{ page.integration_type }}.html %}
{% endif %}
</div>

<main class="docs__body stage__body">
<div class="docs__navbar">
<div class="flex flex--justify gutter gutter--large@medium">
<div class="flex__column flex__column--6@xlarge">
<div class="flex__column flex__column--6@xlarge">
<div class="search">
{% include_cached navbar/search.html container="autocomplete" %}
</div>
</div>

<div class="flex__column flex__column--shrink">
<div class="flex__column flex__column--shrink">
{% include_cached navbar/nav.html %}
</div>
</div>
Expand Down Expand Up @@ -65,19 +65,10 @@ <h1 id="{{ page.title | slugify }}">
{%- endunless -%}

<div class="markdown">
{% if page.integration_type == 'source' %}
{% capture cloud-app-note %}{% include content/cloud-app-note.md %}{% endcapture %}
{{ cloud-app-note | markdownify }}
{% endif %}


{{ content }}

{% if page.integration_type == 'destination' %}
{% unless page.hide-boilerplate == true %}
{% capture integration-foot %}{% include content/integration-foot.md %}{% endcapture %}
{{ integration-foot | markdownify }}
{% endunless %}
{% endif %}
</div>

<p class="last-modified">This page was last modified: {{ page.last_modified_at | date: '%d %b %Y' }}</p>
Expand All @@ -99,10 +90,10 @@ <h1 id="{{ page.title | slugify }}">
{% if page.hide-boilerplate == true %}
{% assign toc_content = content %}
{% else %}
{% assign toc_foot = integration-foot | markdownify %}
{% assign toc_foot = destination-footer | markdownify %}
{% assign toc_content = content | append: toc_foot %}
{% endif %}

<div data-anchors-indicator data-sections="h2" data-active-class="menu-side__link--active">
{% include sidebar/menu-side.html class="menu-side" anchor_class="menu-side__link" html=toc_content h_min=2 h_max=2 %}
</div>
Expand Down
13 changes: 13 additions & 0 deletions src/_layouts/source.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
layout: integration
---

<div class="markdown">
{% if page.integration_type == 'source' %}
{% capture cloud-app-note %}{% include content/cloud-app-note.md %}{% endcapture %}
{{ cloud-app-note | markdownify }}
{% endif %}

{{ content }}

</div>
7 changes: 6 additions & 1 deletion src/connections/sources/catalog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ layout: catalog
menu_icon: "read-more"
redirect_from:
- '/docs/connections/sources/catalog/cloud-apps/'
- '/docs/connections/sources/catalog/cloud-apps/'
- '/docs/connections/sources/catalog/libraries/'
- '/docs/connections/sources/catalog/libraries/'
- '/docs/connections/sources/catalog/libraries/mobile/'
- '/docs/connections/sources/catalog/libraries/ott/'
- '/docs/connections/sources/catalog/libraries/server/'
- '/docs/connections/sources/catalog/libraries/website/'
---
Below is a list of the available sources on the Segment platform.

Expand Down
2 changes: 1 addition & 1 deletion src/connections/storage/catalog/amazon-s3/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,4 +216,4 @@ For user-property destinations, Segment sends an [identify](/docs/connections/sp

When you first create an audience, Personas sends an Identify call for every user in that audience. Later audience syncs send updates for users whose membership has changed since the last sync.

{% include content/integration-foot.md %}
{% include content/destination-footer.md %}