Skip to content
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

Fix incorrect info about redirects #8682

Merged
merged 3 commits into from
Jan 3, 2025
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
10 changes: 9 additions & 1 deletion _docs/_contributing/content_management/redirecting_urls.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ page_order: 3
{% endtab %}

{% tab new location %}
After you move or rename the relevant Markdown file, navigate to the `assets/js/` directory and open the global redirect file.
Move or rename the relevant Markdown file, then navigate to the `assets/js/` directory and open the global redirect file.

```bash
braze-docs
Expand All @@ -54,6 +54,10 @@ braze-docs
└── broken_redirect_list.js
```

{% alert tip %}
If you don't plan on moving or renaming the file, you can also set up the redirect directly in your file's YAML front matter with [`layout: redirect`]({{site.baseur}}/contributing/yaml_front_matter/page_layouts/#redirect), instead of creating a new one in the global redirect file.
{% endalert %}

At the of the file, create a redirect on a new line using the following syntax:

```javascript
Expand Down Expand Up @@ -137,3 +141,7 @@ https://braze-docs-gtcavota9-braze.vercel.app/docs/user_guide/sage_ai/predictive
{% alert tip %}
If you're using VS Code, hold **CMD** while right-clicking a link to open it in your default browser. Because these are the old links, they should all redirect to the new URL specified in the redirect file. If it doesn't, there's an issue with the redirect.
{% endalert %}

## Troubleshooting

{% multi_lang_include contributing/troubleshooting/redirects.md %}
4 changes: 2 additions & 2 deletions _docs/_contributing/content_management/reusing_content.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ page_order: 4
noindex: true
---

# Reusing content
# Reusing content with includes

> Learn how to reuse content across Braze Docs, so you can improve content consistency and reduce the time for content creation. For general information about content reuse, see [About content management]({{site.baseurl}}/contributing/content_management/#content-reuse).
> Learn how to reuse content with includes across Braze Docs, so you can improve content consistency and reduce the time for content creation. For general information about content reuse, see [About content management]({{site.baseurl}}/contributing/content_management/#content-reuse).

Content reuse in Jekyll is accomplished using includes. Includes are stored in the `_includes` directory as a regular Markdown file. Although, unlike the Markdown files in the `_docs` directory, these files don't need YAML front matter.

Expand Down
16 changes: 1 addition & 15 deletions _docs/_contributing/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,7 @@ noindex: true

## Redirect isn't working

If a [redirect you set up]({{site.baseurl}}/contributing/content_management/redirecting_urls/) in the global redirect file (`assets/js/broken_redirect_list.js`) isn't working, double-check your URL string for any uppercase characters. If you find any, convert them to lowercase (even if the corresponding filename in the `_docs` directory contains uppercase characters).

{% tabs local %}
{% tab before %}
```javascript
validurls['/docs/hidden/WIP_Partnerships/WIP_Guidelines'] = '/docs/contributing/home/';
```
{% endtab %}

{% tab after %}
```javascript
validurls['/docs/hidden/wip_partnerships/wip_guidelines'] = '/docs/contributing/home/';
```
{% endtab %}
{% endtabs %}
{% multi_lang_include contributing/troubleshooting/redirects.md %}

## Cross-reference link returns a 404

Expand Down
176 changes: 88 additions & 88 deletions _docs/_contributing/yaml_front_matter/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If you're new to Braze Docs or docs-as-code, start with our tutorial.

## Required keys

### Article title
### `article_title`

The `article_title` key is used to set the page title for online search results and the end-user's browser tab. This key accepts any `string` value. For naming conventions, see the [Braze Docs Style Guide]({{site.baseurl}}/contributing/style_guide/).

Expand All @@ -58,7 +58,7 @@ article_title: Getting started with Braze Docs
{% endtab %}
{% endtabs %}

### Description
### `description`

The `description` key is used to set the page description in online search results. This key accepts any `string` value under 150 characters that's surrounded by double quotes.

Expand All @@ -72,7 +72,7 @@ description: "If you're new to Braze Docs, start with this step-by-step tutorial
{% endtab %}
{% endtabs %}

### Navigation title
### `navigation title`

The `nav_title` key is used to set the page title on the left-side navigation bar on Braze Docs. This key accepts any `string` less than 30 characters. If the [`hidden`](#hide-page-from-navigation) key is set to `true`, `nav_title` is not required.

Expand All @@ -88,62 +88,59 @@ nav_title: Getting started

## Optional keys

### Engagement tool
### `channel`

The `tool` key is used to set the page's related engagement tools. This key accepts one or more of the following `string` values as a list.
The `channel` key is used to set a page's related messaging channels. This key accepts one or more of the following `string` values as a list.

- `dashboard`
- `docs`
- `canvas`
- `campaigns`
- `currents`
- `location`
- `media`
- `reports`
- `segments`
- `templates`
- `content cards`
- `email`
- `in-app messages`
- `news feed`
- `push`
- `sms`
- `webhooks`

{% tabs local %}
{% tab usage example %}
```markdown
---
tool:
- currents
- segments
channel:
- email
- news feed
---
```
{% endtab %}
{% endtabs %}

### Hide page from navigation
### `config_only`

The `hidden` key is used to hide a page from the left-side navigation on Braze Docs. This key accepts the boolean values `true` or `false`.
The `config_only` key is used to hide a page's content without hiding it on left-side navigation bar. Use this key when [creating a section without a landing page]({{site.baseurl}}/contributing/content_management/sections?tab=without%20landing%20page#step-2-configure-your-section). This key accepts the boolean values `true` or `false`.

{% tabs local %}
{% tab usage example %}
```markdown
---
hidden: true
config_only: true
---
```
{% endtab %}
{% endtabs %}

### Hide page from search
### `hidden`

The `noindex` key is used to hide a page from internal and external search results (such as Braze Docs and Google Search). This key accepts the boolean values `true` or `false`.
The `hidden` key is used to hide a page from the left-side navigation on Braze Docs. This key accepts the boolean values `true` or `false`.

{% tabs local %}
{% tab usage example %}
```markdown
---
noindex: true
hidden: true
---
```
{% endtab %}
{% endtabs %}

### Hide table of contents
### `hide_toc`

The `hide_toc` key is used to hide the in-page table of contents (TOC) on the right side of the page. This key accepts the boolean values `true` or `false`.

Expand All @@ -157,157 +154,160 @@ hide_toc: true
{% endtab %}
{% endtabs %}

### Hide heading from table of contents
### `layout`

By default, the table of contents (TOC) displays all heading levels. To show only specific heading levels, use the `toc_headers` key to explicitly list the desired levels. Any heading levels not listed will be hidden from the TOC.

This key accepts the following string values:
The `layout` key is used to set the layout for a page. If `layout` is not set, the `default` layout will be used. This key accepts any of the following `string` values. For a description and example of each layout, see [Page layouts]({{site.baseurl}}/contributing/yaml_front_matter/page_layouts/).

- `h1`
- `h2`
- `h3`
- `h4`
- `api_page`
- `dev_guide`
- `featured_video`
- `featured`
- `glossary_page`
- `blank_config`
- `redirect`

{% tabs local %}
{% tab usage example %}
```markdown
---
toc_headers: h2
page_layout: glossary_page
---
```
{% endtab %}
{% endtabs %}

### Messaging channel
### `noindex`

The `channel` key is used to set a page's related messaging channels. This key accepts one or more of the following `string` values as a list.

- `content cards`
- `email`
- `in-app messages`
- `news feed`
- `push`
- `sms`
- `webhooks`
The `noindex` key is used to hide a page from internal and external search results (such as Braze Docs and Google Search). This key accepts the boolean values `true` or `false`.

{% tabs local %}
{% tab usage example %}
```markdown
---
channel:
- email
- news feed
noindex: true
---
```
{% endtab %}
{% endtabs %}

### Navigation only
### `page_order`

The `config_only` key is used to hide a page's content without hiding it on left-side navigation bar. Use this key when [creating a section without a landing page]({{site.baseurl}}/contributing/content_management/sections?tab=without%20landing%20page#step-2-configure-your-section). This key accepts the boolean values `true` or `false`.
The `page_order` key is used to [order sections]({{site.baseurl}}/contributing/content_management/sections/#ordering-a-section) on the left-side navigation bar. This key accepts any non-negative number (such as `0`, `20`, or `5.5`).

{% tabs local %}
{% tab usage example %}
```markdown
---
config_only: true
page_order: 35.6
---
```
{% endtab %}
{% endtabs %}

### Override default URL
### `page_type`

The `permalink` key is used with the [`hidden`](#hide-page-from-navigation) key to override the default URL for a page on Braze Docs. The value assigned to `permalink` will be prepended with `https://www.braze.com/docs` before redirecting. This key accepts any `string` value meeting the following requirements.
The `page_type` key is used to set formatting of a page. This key accepts any of the following `string` values.

- Characters are lowercase
- Words are separated by underscores (`_`)
- "Directories" are separated by forward slashes (`/`)
- All other special characters are removed
- `glossary`
- `solution`
- `reference`
- `tutorial`
- `landing`
- `partner`
- `update`

For more information about each value, see [Page types]({{site.baseurl}}/contributing/yaml_front_matter/page_layouts/).

{% tabs local %}
{% tab usage example %}
```markdown
---
hidden: true
permalink: /support_contact/docs_team/
page_type: tutorial
---
```
{% endtab %}
{% endtabs %}

### Page layout
### `permalink`

The `layout` key is used to set the layout for a page. If `layout` is not set, the `default` layout will be used. This key accepts any of the following `string` values. For a description and example of each layout, see [Page layouts]({{site.baseurl}}/contributing/yaml_front_matter/page_layouts/).
The `permalink` key is used with the [`hidden`](#hide-page-from-navigation) key to override the default URL for a page on Braze Docs. The value assigned to `permalink` will be prepended with `https://www.braze.com/docs` before redirecting. This key accepts any `string` value meeting the following requirements.

- `api_page`
- `dev_guide`
- `featured_video`
- `featured`
- `glossary_page`
- `blank_config`
- `redirect`
- Characters are lowercase
- Words are separated by underscores (`_`)
- "Directories" are separated by forward slashes (`/`)
- All other special characters are removed

{% tabs local %}
{% tab usage example %}
```markdown
---
page_layout: glossary_page
hidden: true
permalink: /support_contact/docs_team/
---
```
{% endtab %}
{% endtabs %}

### Page order
### `platform`

The `page_order` key is used to [order sections]({{site.baseurl}}/contributing/content_management/sections/#ordering-a-section) on the left-side navigation bar. This key accepts any non-negative number (such as `0`, `20`, or `5.5`).
The `platform` key is used to set the page's related platforms. This key accepts one or more [Braze SDKs]({{site.baseurl}}/developer_guide/home/) as a `string` value in a list.

{% tabs local %}
{% tab usage example %}
```markdown
---
page_order: 35.6
platform:
- iOS
- Web
- Android
---
```
{% endtab %}
{% endtabs %}

### Page type
### `toc_headers`

The `page_type` key is used to set formatting of a page. This key accepts any of the following `string` values.
By default, the table of contents (TOC) displays all heading levels. To show only specific heading levels, use the `toc_headers` key to explicitly list the desired levels. Any heading levels not listed will be hidden from the TOC.

- `glossary`
- `solution`
- `reference`
- `tutorial`
- `landing`
- `partner`
- `update`
This key accepts the following string values:

For more information about each value, see [Page types]({{site.baseurl}}/contributing/yaml_front_matter/page_layouts/).
- `h1`
- `h2`
- `h3`
- `h4`

{% tabs local %}
{% tab usage example %}
```markdown
---
page_type: tutorial
toc_headers: h2
---
```
{% endtab %}
{% endtabs %}

### Platform
### `tool`

The `platform` key is used to set the page's related platforms. This key accepts one or more [Braze SDKs]({{site.baseurl}}/developer_guide/home/) as a `string` value in a list.
The `tool` key is used to set the page's related engagement tools. This key accepts one or more of the following `string` values as a list.

- `dashboard`
- `docs`
- `canvas`
- `campaigns`
- `currents`
- `location`
- `media`
- `reports`
- `segments`
- `templates`

{% tabs local %}
{% tab usage example %}
```markdown
---
platform:
- iOS
- Web
- Android
tool:
- currents
- segments
---
```
{% endtab %}
Expand Down
Loading