Skip to content

Redirect from the old Data Residency page to Regional Segment #2448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 3, 2022
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: 0 additions & 4 deletions .vscode/yml.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,4 @@
"body":["- name: ${1:name}\r\tdescription: ${2:description}\r\tdefault: ${3}"],
"description": "Yaml settings"
},
"ext_link":{
"prefix": ["{:}"],
"body":["{:target='${1:_blank}'}"]
},
}
20 changes: 10 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Before you begin:

## Use the contribution links from any docs page

Not all pages have a 1-1 mapping with their location within the repository. This can make browsing and locating the file you're trying to reference a challenge. As you browse [segment.com/docs](https://segment.com/docs), you'll notice two links in the right sidebar, at the top of the page. Click **Edit this page** to open the page in the Github editor. Or, click **Request docs change** to create a new issue that references the page.
Not all pages have a 1-1 mapping with their location within the repository. This can make browsing and locating the file you're trying to reference a challenge. As you browse [segment.com/docs](https://segment.com/docs), you'll notice two links in the right sidebar, at the top of the page. Click **Edit this page** to open the page in the GitHub editor. Or, click **Request docs change** to create a new issue that references the page.

## Want to go deeper? Fork the repository

Expand Down Expand Up @@ -39,7 +39,7 @@ The most interesting ones are:

### Images

**Save all images locally! No linking to 3rd party-hosted images!** Images are published to our CDN from the build step, and this means they won't go missing if the hosting service dujour goes out of business.
**Save all images locally! No linking to third-party hosted images!** Images are published to our CDN from the build step, and this means they won't go missing if the hosting service dujour goes out of business.

There are no _enforced_ naming conventions at this time. Files that start with an underscore are ignored by Jekyll. Anything you see with `asset` was dowloaded by a script to migrate it out of Contents.io.

Expand Down Expand Up @@ -77,11 +77,11 @@ Sources pages check if the source is a cloud-app, then include information about

Content with in each `.md` file is markdown. For information about styling, and available extensions, see `_src/utils/formatguide.md` or the live version [here](https://segment.com/docs/utils/formatguide).

### Frontmatter
### Front matter

Each Markdown file in the docs can have "frontmatter" associated with it at the top of the file. These are considered by Jekyll to be "properties" of a page, generally control how the HTML page is built or rendered.
Repository Markdown files often contain front matter metadata, which you'll find at the top of the file. These front matter variables instruct Jekyll how to build and render the page as HTML.

Frontmatter in a file will look something like this:
Front matter in a file will look something like this:

```md
---
Expand All @@ -90,25 +90,25 @@ hide-feedback: false
---
```

Each piece of frontmatter does something special!
Front matter variables have unique functions, including the following:

#### Content-related frontmatter
#### Content-related front matter
- `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.
- `rewrite`: defaults to false. This is a legacy front matter 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-dossier`: defaults to false. When true, hides the "quick info" box at the top of a 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 `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.

#### Utility frontmatter
#### Utility front matter
- `published`: defaults to true. Set this to "false" to prevent Jekyll from rendering an HTML page for this file. Good for when you're working on something in the repo but aren't ready to release it yet, and don't want to use a Draft PR.
- `hidden`: omits the file from the `sitemap.xml`, adds a `<meta name="robots" content="noindex" />` to the top of the generated HTML file, and drops it from the convenience script for regenerating the nav.
- `hide-sidebar`: defaults to false. When true, hide the entire right-nav sidebar. Use with `hide-feedback` if you want to disable *all* feedback affordances.
- `hide-feedback`: defaults to false. When true, hide the feedback in both rnav and footer. Good for landing pages.
- `hide_toc`: hides the right-nav TOC that's generated from H2s. Also good for landing pages.
- `landing`: defaults to false. Use this to drop the noun set by `integration_type` from the tab title.
- `redirect_from`: Defaults to null. Takes an array of URLs from the frontmatter in a file, and generates a "stub" page at each URL at build-time. Each stub file redirects to the original file. Use the path from the root of the content directory, for example `/connections/destinations/catalog/` rather than `/docs/connections/destinations/catalog/`. **Note** We are mostly using NGINX redirects for SEO purposes. Approximately quarterly, we'll collect these and add them to NGINX.
- `redirect_from`: Defaults to null. Takes an array of URLs from the front matter in a file, and generates a "stub" page at each URL at build-time. Each stub file redirects to the original file. Use the path from the root of the content directory, for example `/connections/destinations/catalog/` rather than `/docs/connections/destinations/catalog/`. **Note** We are mostly using NGINX redirects for SEO purposes. Approximately quarterly, we'll collect these and add them to NGINX.
- `seo-changefreq`: default: `weekly `. Use the values [in the sitemap spec](https://www.sitemaps.org/protocol.html#xmlTagDefinitions). - sets the `changefreq` tag in the sitemap.xml generator, which tells search crawlers how often to check back.
- `seo-priority`: values from `1.0` to `0.1`, default: `0.5 `. Sets the `Priority` tag in the sitemap
25 changes: 16 additions & 9 deletions scripts/catalog_papi.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,14 @@ const updateSources = async () => {
}, options);
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/source_categories.yml`), output);

// Create reginal support map
output = "# AUTOGENERATED LIST OF CONNECTIONS THAT SUPPORT REGIONAL\n"
output += "# Last updated " + todayDate + " \n";

// output = "# AUTOGENERATED LIST OF CONNECTIONS THAT SUPPORT REGIONAL\n"
// output += "# Last updated " + todayDate + " \n";
output += yaml.dump({
sources: regionalSourcesUpdated
}, options)
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/regional-supported.yml`), output);
fs.appendFileSync(path.resolve(__dirname, `../src/_data/catalog/regional-supported.yml`), output);
console.log("sources done")
}

const updateDestinations = async () => {
Expand Down Expand Up @@ -329,7 +330,7 @@ const updateDestinations = async () => {
let regional = ['us-west']

// We need to be able to keep the system slug in some cases.
const slugOverrides = ['actions-google-enhanced-conversions', 'actions-google-analytics-4', 'actions-facebook-conversions-api']
const slugOverrides = ['actions-google-enhanced-conversions', 'actions-google-analytics-4', 'actions-facebook-conversions-api', 'actions-friendbuy-cloud']
let slug = slugify(destination.name)
if (slugOverrides.includes(destination.slug)) {
slug = destination.slug
Expand All @@ -340,7 +341,8 @@ const updateDestinations = async () => {
const actionsDests = [
'amplitude-actions',
'slack-actions',
'fullstory-actions'
'fullstory-actions',
'friendbuy-actions'
]

if (actionsDests.includes(slug)) {
Expand Down Expand Up @@ -482,6 +484,7 @@ const updateDestinations = async () => {
noArrayIndent: false
})
fs.appendFileSync(path.resolve(__dirname,`../src/_data/catalog/regional-supported.yml`),output);
console.log("destinations done")
}

const updateWarehouses = async () => {
Expand Down Expand Up @@ -545,19 +548,23 @@ const updateWarehouses = async () => {
noArrayIndent: true
};
// output = "# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT\n"
// var todayDate = new Date().toISOString().slice(0, 10);
const todayDate = new Date().toISOString().slice(0, 10);
// output += "# warehouse data last updated " + todayDate + " \n";
// output += yaml.dump({
// items: warehousesUpdated
// }, options);
// fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalog/warehouse_papi.yml`), output);

output = yaml.dump({
// Create regional support map
output = "# AUTOGENERATED LIST OF CONNECTIONS THAT SUPPORT REGIONAL\n"
output += "# Last updated " + todayDate + " \n";
output += yaml.dump({
warehouses: warehousesUpdated
}, {
noArrayIndent: false
})
fs.appendFileSync(path.resolve(__dirname,`../src/_data/catalog/regional-supported.yml`),output);
fs.writeFileSync(path.resolve(__dirname,`../src/_data/catalog/regional-supported.yml`),output);
console.log("warehouses done")
}
updateSources()
updateWarehouses()
Expand Down
2 changes: 1 addition & 1 deletion src/_data/catalog/destination_categories.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
# destination categories last updated 2022-01-26
# destination categories last updated 2022-02-01
items:
- display_name: A/B Testing
slug: a-b-testing
Expand Down
Loading