Skip to content

Commit

Permalink
moving useful component content
Browse files Browse the repository at this point in the history
  • Loading branch information
runleonarun committed Sep 27, 2022
1 parent a0160c4 commit a1c158c
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 12 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ You can use components documented in the [docusaurus library](https://v2.docusau

When writing content, you should refer to the [style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) and [content types](/contributing/content-types.md) to help you understand our writing standards and how we break down information in the product documentation.

## Versioning content
## Versioning and single-sourcing content

We now provide dynamic versioning in the dbt Labs product documentation. To learn more about how to version the docs for dbt Core, see [Managing available versions](/contributing/versioningdocs.md).
We now enable you to reuse content between different docs pages, version pages, and establish product variables in the dbt Labs product documentation. To learn more about how to single source content between versions, product variables, and other content, see [Single-sourcing content](/contributing/single-sourcing-content.md).

# Running the Docs site locally

You can click a link available in a netlify bot PR comment to see and review your changes rendered on a staging server. You are also able to see and review your proposed modifications locally on your computer. Our setup instructions use [homebrew](https://brew.sh/):

## Prerequisites

* (Mac Terminal) Install [Xcode Command Line Tools](https://developer.apple.com/download/more/)
- Open a terminal window, run `xcode-select --install`, and follow the on-screen prompts in the pop-up window.
* (Mac and Linux) Install [homebrew](https://brew.sh/)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,43 @@
## Tabs for configs on multiple resources
## Using warehouse components

<WHCode>

<div warehouse="BigQuery">

```sql
select * from `dbt-tutorial.jaffle_shop.customers`
```

</div>

<div warehouse="Databricks">

```sql
select * from default.jaffle_shop_customers
```

</div>

<div warehouse="Redshift">

```sql
select * from jaffle_shop_customers
```

</div>

<div warehouse="Snowflake">

```sql
select * from raw.jaffle_shop.customers
```

</div>

</WHCode>


## Using tabs for multiple resources

<Tabs
defaultValue="models"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# Managing Available Versions
# Single-sourcing content

* [Adding a new version](#adding-a-new-version)
* [Using end-of-life dates](#using-end-of-life-dates)
* [Versioning entire pages](#versioning-entire-pages)
* [Versioning blocks of content](#versioning-blocks-of-content)
* [About versioning](#adding-a-new-version)
* [Using end-of-life dates](#using-end-of-life-dates)
* [Versioning entire pages](#versioning-entire-pages)
* [Versioning blocks of content](#versioning-blocks-of-content)
* [Using global variables](#using-global-variables)
* [Reusing snippets of content](#reusing-snippets-of-content)

## About versioning

Versions are managed in the `versions` array located in the `website/dbt-versions.js` file. This array holds all versions which are selectable from the versions dropdown in the navigation.

**The first version in the array is the latest version.** This is the default version when a visitor loads the page.

## Adding a new version
### Adding a new version

To add a new version to the site, a new object must be added to the `versions` array in the same format as existing versions. This object holds two properties: **version** and **EOLDate (See End of Life Dates below)**.

Expand All @@ -28,7 +30,7 @@ exports.versions = [

The **version** property is the value which shows in the nav dropdown. This value is compared to the VersionBlock component on a docs page to determine whether that section should be visible for the current active version (See the **Versioning the Sidebar** section on using the VersionBlock component).

## Using end-of-life dates
### Using end-of-life dates

The **EOLDate** property determines when a version is no longer supported. A version is supported up until 1 year after its release.

Expand All @@ -39,11 +41,11 @@ Two different versions of the banner will show depending on the end-of-life date
- When the version is within 3 months of the **EOLDate.**
- When the version has passed the **EOLDate.**

### Updating EOL date banner language
#### Updating EOL date banner language

The content for these two EOLDate banners are located in the `website/src/theme/DocPage/index.js` file, in the `EOLBannerText` property.

## Versioning entire pages
### Versioning entire pages

If a Docs page should not be available for the selected version, it is possible to version the entire page. This is managed in the `versionedPages` array within the `website/dbt-versions.js` file.

Expand Down

0 comments on commit a1c158c

Please sign in to comment.