Skip to content

About content management

This is an overview for how content is managed on Braze Docs. To learn more about a specific topic, choose the dedicated topic page in the navigation.

Methodology

Braze Docs is managed using docs-as-code, a method for managing documentation that mirrors the software development lifecycle by using a version control system. Braze Docs uses the Git version control system, which allows contributors to work on the same piece of documentation without overwriting each other’s work. For more information, see About version control and Git.

The Braze Docs repository's home page on GitHub.

Site generator

Braze Docs is built using Jekyll, a popular static-site generator that allows content files and design files to be stored in separate directories, such as _docs for content files and assets for design files. When the site is built, Jekyll intelligently merges each file and stores them as XML and HTML data in the _site directory. For more information, see Jekyll Directory Structure.

The home page for Braze Docs.

As a contributor, you’ll primarily work within the following directories.

Directory Description
_docs Contains all the written content for Braze Docs as text files written in Markdown. Text files are organized into directories and subdirectories mirroring the docs site, such as _api for the API section and user_guide for the User Guide section.
_includes Contains text files (called “includes”) that can be reused in any file within the _docs directory. Typically, includes are short, modular pieces of content that don’t use standard formatting. The files stored in this location are important for content reuse.
assets Contains all the images for Braze Docs. Any text file in the _docs or _includes directory can link to this directory to display an image on its page.

Pages

Each page on Braze Docs is written in Markdown syntax and stored as a Markdown file using the .md file extension. At the top of each Markdown file, YAML front matter is used to add hidden metadata for each page.

1
2
3
4
5
---
METADATA_KEY: METADATA_VALUE
---

# CONTENT

Replace the following.

Placeholder Description
METADATA_KEY The key representing a supported metadata type. For more information, see Metadata.
METADATA_VALUE The value assigned to the metadata type’s key. For more information, see Metadata.
CONTENT The page’s content written in Markdown syntax.
1
2
3
4
5
6
7
8
9
10
11
---
nav_title: Contributing to Braze Docs
article: Contributing to Braze Docs
description: "Here's what you need to start contributing to Braze Docs!"
page_order: 0
search_tag: Contributing
---

# Contributing to Braze Docs

> Thanks for contributing to Braze Docs! Every Tuesday and Thursday, we merge community contributions and deploy them to Braze Docs. Use this guide to get your changes merged during our next deployment.

Example page on Braze Docs.

Images

Images are stored as PNG files inside assets/img. The structure of the img directory does not need to match the structure of Braze Docs; however, it’s best to group related images together into subdirectories.

Each image can be linked to one or more pages using the following syntax.

1
![ALT_TEXT.]({% image_buster /assets/img/DIRECTORY/IMAGE.png %})

Replace the following.

Placeholder Description
ALT_TEXT The alt text for the image. This is required to ensure Braze Docs is equally accessible for those using screen readers.
IMAGE The relative path to your image starting from the img directory.

Your in-line image should be similar to the following:

1
![The form for creating a new pull request on GitHub.]({% image_buster /assets/img/contributing/getting_started/github_pull_request.png %})

Sections

Braze Docs is organized into primary sections and subsections.

Primary sections

The primary sections on Braze Docs are:

Other than Contributing to Braze Docs, these primary sections can be accessed on the site header from any page on Braze Docs.

The primary sections as shown on the site header on Braze Docs.

Each primary section is built using Jekyll collections, which allows related content to be grouped together for easy management. Keep in mind, while all primary sections are collections, not all collections are primary sections. You can find the full list of Braze Docs collections in the Jekyll configuration file, _config.yml.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
collections:
  home:
    title: Documentation
    output: true
    default_nav_url: ''
    page_order: 1
  user_guide:
    title: User Guide
    output: true
    default_nav_url: introduction/
    page_order: 2
  developer_guide:
    title: Developer Guide
    output: true
    default_nav_url: home/
    page_order: 3
  api:
    title: API
    output: true
    default_nav_url: home/
    page_order: 4
  partners:
    title: Technology Partners
    output: true
    default_nav_url: home/
    page_order: 5
  help:
    title: Help
    output: true
    default_nav_url: home/
    page_order: 6
  contributing:
    output: true
    default_nav_url: contributing/
  hidden: # Hidden pages not directly linked via navigation
    title: Braze
    output: true
    hidden: true
  docs_pages: # Site specific pages. ie main redirects and search
    title: Braze
    output: true
    hidden: true

Each collection listed represents a directory within the _docs directory.

1
2
3
4
5
6
7
8
9
10
11
braze-docs
└── _docs
    ├── _api
    ├── _contributing
    ├── _developer_guide
    ├── _docs_pages
    ├── _help
    ├── _hidden
    ├── _home
    ├── _partners
    └── _user_guide

The landing page for each primary section is a standard Markdown file with the page_order: key set to 0.

1
2
3
4
5
6
7
---
page_order: 0
nav_title: Home
article_title: Braze User Guide
layout: user_guide
user_top_header: "Braze User Guide"
---

An example landing page on Braze Docs.

Subsections

All primary sections on Braze Docs contain one or more subsection, each representing an expandable item on the left-side navigation.

Unlike primary sections, subsections can be configured with or without a landing page. Subsections without landing pages are helpful for organizing related content together while minimizing the number of non-useful pages in Braze Docs. Whether a subsection is configured with or without a landing page, all subsections represent both a directory and Markdown file in the repository. For an example, see the following.

1
2
3
4
5
6
7
8
9
10
11
braze-docs
└── _docs
    └── _primary_section
        ├── subsection_a
        │   ├── page_a.md
        │   └── page_b.md
        ├── subsection_b
        │   ├── page_a.md
        │   └── page_b.md
        ├── subsection_a.md # not configured as a landing page
        └── subsection_b.md # configured as a landing page  

In the _primary_section directory, subsection_a is not configured with a landing page, while subsection_b is configured with a landing page. In the following example, subsection_a.md has config_only: set to true, which prevents this page from being rendered as a landing page.

1
2
3
4
5
---
nav_title: Subsection A
page_order: 0
config_only: true
---

The left-side navigation on Braze Docs, showing an example of an expanded section without a landing page.

However, subsection_b.md doesn’t use the config_only: key, so this page is rendered as a landing page.

1
2
3
4
---
nav_title: Subsection B
page_order: 0
---

The left-side navigation on Braze Docs, showing an example of an expanded section with a landing page.

Content reuse

Jekyll offers the ability to reuse written content across the docs using the include tag. Includes are located in the _includes directory and can be written in Markdown or HTML syntax.

1
{% multi_lang_include RELATIVE_PATH/FILE %}

Replace the following:

Placeholder Description
RELATIVE_PATH (Optional) The relative path to the file from the _includes directory. This is only needed if you’re including a file from a directory inside the _includes directory, such as _includes/braze/upgrade_notice.md.
FILE The name of the file including the file extension.
1
2
3
4
5
# Pages

> Learn how to create, modify, and remove pages on Braze Docs.

{% multi_lang_include contributing/prerequisites.md %}

Content reuse example on Braze Docs.

Layouts

By default, Jekyll uses the default.html layout in the _layouts directory to build each page on Braze Docs. However, different layouts can be used by assigning the layout to the layout: key in the YAML front matter.

1
2
3
---
layout: LAYOUT_VALUE
---

Replace LAYOUT_VALUE with the name of the layout file and the file extension removed.

File tree

1
2
3
braze-docs
└── _layouts
    └── api_page.html

In-page metadata

1
2
3
---
layout: api_page
---

API glossary layout example on Braze Docs.

URLs

URLs on Braze Docs always match the directory structure within the docs repository. Given the following example file tree, the URL for page_a.md would be https://www.braze.com/docs/primary_section/subsection_a/page_a.

1
2
3
4
5
braze-docs
└── _docs
    └── _primary_section
        └── subsection_a
            └── page_a.md

This includes URLs for pages located in a subsection with config_only: set to true. Even though config_only subsections aren’t rendered as pages, the subsection’s directory name is still used to generate the URLs for pages in that directory. For an example, see the following.

1
2
3
4
5
6
7
8
9
10
11
braze-docs
└── _docs
    └── _primary_section
        ├── subsection_a
        │   ├── page_a.md
        │   └── page_b.md
        ├── subsection_b
        │   ├── page_a.md
        │   └── page_b.md
        ├── subsection_a.md # not configured as a landing page
        └── subsection_b.md # configured as a landing page  

Example landing page

1
2
3
4
5
---
nav_title: Subsection A
page_order: 1 
config_only: true
---

Since subsection_a.md is configured as a landing page, only page_a.md and page_b.md will receive a unique URL. subsection_b.md will not receive any URL.

Example URLs

1
2
3
Subsection A URL: N/A
Page A URL: https://www.braze.com/docs/primary_section/subsection_a/page_a
Page B URL: https://www.braze.com/docs/primary_section/subsection_a/page_b

Example landing page

1
2
3
4
---
nav_title: Subsection B
page_order: 2 
---

Since subsection_b.md is configured as a landing page, page_a.md, page_b.md, and subsection_b.md will receive a unique URL.

Example URLs

1
2
3
Subesction B URL: https://www.braze.com/docs/primary_section/subsection_b
Page A URL: https://www.braze.com/docs/primary_section/subsection_b/page_a
Page B URL: https://www.braze.com/docs/primary_section/subsection_b/page_b
HOW HELPFUL WAS THIS PAGE?
New Stuff!