Skip to content

Commit

Permalink
Merge branch 'current' into deprecate-1dot0
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewshaver authored Sep 8, 2023
2 parents a048718 + e8d73fe commit 581daeb
Show file tree
Hide file tree
Showing 139 changed files with 5,146 additions and 2,436 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ body:
label: Additional information
description: Add any other context or screenshots about the feature request here.
validations:
required: false
required: false
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Want to see new content? Open a discussion!
url: https://github.com/dbt-labs/docs.getdbt.com/discussions/new
about: You can open a discussion to propose new content for the dbt product documentation.
- name: Have questions about dbt? Join the Community!
url: https://www.getdbt.com/community/join-the-community
about: You can join the dbt Labs Community to ask and answer questions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/improve-the-site.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Improve the docs.getdbt.com site
description: Make a suggestion or report a problem about the technical implementation of docs.getdbt.com.
labels: ["engineering"]
name: Report a docs.getdbt.com site issue
description: Report a problem about the technical implementation of docs.getdbt.com.
labels: ["engineering","bug"]
body:
- type: markdown
attributes:
Expand Down Expand Up @@ -39,4 +39,4 @@ body:
label: Additional information
description: Any additional information, configuration, or data that might be necessary to reproduce the issue.
validations:
required: false
required: false
33 changes: 0 additions & 33 deletions .github/ISSUE_TEMPLATE/new-dbt-feature.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/zzz_add-adapter-to-trusted-list.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Add adapter to Trusted list
description: For adapter maintainers who wish to have theirs added to the list of Trusted adapters.
title: "Trust dbt-myadapter"
labels: ["adapter maintainers"]
assignees:
- dataders
body:
- type: markdown
attributes:
value: |
We're excited that you'd like to support your adapter formally as "Trusted"! This template will ensure that you are aware of the process and the guidelines. Additionally, that you can vouch that your adapter currently meets the standards of a Trusted adapter. For more information, see [Trusted adapters](https://docs.getdbt.com/docs/trusted-adapters)
- type: input
id: adapter-repo
attributes:
label: Link to adapter repo
description: Please link to the GitHub repo
validations:
required: true

- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you?
placeholder: your preferred email and/or dbt Slack handle
validations:
required: true

- type: dropdown
id: author_type
attributes:
label: Which of these best describes you?
options:
- I am a dbt Community member
- I work for the vendor on top of which the dbt adapter functions
validations:
required: true

- type: checkboxes
id: read-program-guide
attributes:
label: Please agree to the each of the following
options:
- label: I am a maintainer of the adapter being submited for Trusted status
required: true
- label: I have read both the [Trusted adapters](https://docs.getdbt.com/docs/trusted-adapters) and [Building a Trusted Adapter](https://docs.getdbt.com/guides/dbt-ecosystem/adapter-development/8-building-a-trusted-adapter) pages.
required: true
- label: I believe that the adapter currently meets the expectations given above
required: true
- label: I will ensure this adapter stays in compliance with the guidelines
required: true
- label: I understand that dbt Labs reserves the right to remove an adapter from the trusted adapter list at any time, should any of the below guidelines not be met
required: true

- type: textarea
id: icon
attributes:
label: What icon should be used?
description: |
Please share an svg image that you'd like to be displayed in for your adapter. Normally, this is the logo for the data platform on top of which your adapter works. If there's a dark mode version, please also share that.
Pasting the image from your clipboard will upload the file to GitHub and create markdown formatting for it to be rendered inline
40 changes: 40 additions & 0 deletions .github/workflows/autogenerated_labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# **what?**
# Labels issues autogenerated in dbt-core

# **why?**
# To organize autogenerated issues from dbt-core to make it easier to find and track them.

# **when?**
# When an issue is opened by the FishtownBuildBot

name: Add Labels to Autogenerated Issues

on:
issues:
types: [opened]

jobs:
add_customized_labels:
if: github.event.issue.user.login == 'FishtownBuildBot'
permissions:
issues: write

runs-on: ubuntu-latest
steps:
- name: "Determine appropriate labels by repo in title"
id: repo
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
run: |
if [[ "$ISSUE_TITLE" == *"dbt-core"* ]]; then
echo "labels='content,improvement,dbt Core'" >> $GITHUB_OUTPUT
else
echo "labels='content,improvement,adapters'" >> $GITHUB_OUTPUT
fi
- name: "Add Labels to autogenerated Issues"
id: add-labels
run: |
gh issue edit ${{ github.event.issue.number }} --repo ${{ github.repository }} --add-label ${{ steps.repo.outputs.labels }}
env:
GH_TOKEN: ${{ secrets.DOCS_SECRET }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ website/yarn.lock
website/node_modules
website/i18n/*

# Local vs code
# IDE configs
.vscode
.idea

# Local Netlify folder
.netlify

.vscode
.eslintcache
44 changes: 22 additions & 22 deletions contributing/single-sourcing-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Versions are managed in the `versions` array located in the `website/dbt-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)**.
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)**.

Example Version:
Example Version:

```jsx
exports.versions = [
Expand All @@ -36,7 +36,7 @@ The **EOLDate** property determines when a version is no longer supported. A ver

When a documentation page is viewed, the **EOLDate** property for the active version is compared to today’s date. If the current version has reached or is nearing the end of support, a banner will show atop the page, notifying the visitor of the end-of-life status.

Two different versions of the banner will show depending on the end-of-life date:
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.**
Expand Down Expand Up @@ -76,7 +76,7 @@ exports.versionedPages = [

## Versioning blocks of content

The **VersionBlock** component provides the ability to version a specific piece of content on a docs page.
The **VersionBlock** component provides the ability to version a specific piece of content on a docs page.

This component can be added directly to a markdown file in a similar way as other components (FAQ, File, Lightbox).

Expand All @@ -99,7 +99,7 @@ Both properties can be used together to set a range where the content should sho

### Example for versioning entire pages

On the [Docs Defer page](https://docs.getdbt.com/reference/node-selection/defer), tabs are used to show different versions of a piece of code. **v0.21.0 and later** shows `--select`, while **v-.20.x and earlier** changes this to `--models`.
On the [Docs Defer page](https://docs.getdbt.com/reference/node-selection/defer), tabs are used to show different versions of a piece of code. **v0.21.0 and later** shows `--select`, while **v-.20.x and earlier** changes this to `--models`.

![oldway](https://user-images.githubusercontent.com/3880403/163254165-dea23266-2eea-4e65-b3f0-c7b6d3e51fc3.png)

Expand Down Expand Up @@ -149,7 +149,7 @@ Using a global variable requires two steps:
exports.dbtVariables = {
dbtCore: {
name: "dbt Core"
}
}
}
```

Expand Down Expand Up @@ -198,13 +198,13 @@ In the above example, the **dbtCloud** property has a default name of “dbt Clo

### Global variables example

The global `<Var />` component can be used inline, for example:
The global `<Var />` component can be used inline, for example:

```markdown
This piece of markdown content explains why <Var name="dbt" /> is awesome.
```

However, a Var component cannot start a new line of content. Fortunately, a workaround exists to use the Var component at the beginning of a line of content.
However, a Var component cannot start a new line of content. Fortunately, a workaround exists to use the Var component at the beginning of a line of content.

To use the component at the beginning of a sentence, add a non-breaking space character before the component:

Expand All @@ -231,7 +231,7 @@ A partial file allows you to reuse content throughout the docs. Here are the ste
2. Go back to the docs file that will pull content from the partial file.
3. Add the following import file: `import ComponentName from '/snippets/_this-is-your-partial-file-name.md';`
* You must always add an import file in that format. Note you can name `ComponentName` (a partial component) can be whatever makes sense for your purpose.
* `.md` needs to be added to the end of the filename.
* `.md` needs to be added to the end of the filename.
4. To use the partial component, go to the next line and add `<ComponentName />`. This fetches the reusable content in the partial file
* Note `anyname` can be whatever makes sense for your purpose.

Expand All @@ -258,15 +258,15 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam fermentum portti
```markdown
Docs content here.

`import SetUpPages from '/snippets/_partial-name.md';`

<SetUpPages />
import SetUpPages from '/snippets/_partial-name.md';
<!-- It's important to leave a blank line or a comment between import and usage, otherwise it won't work -->
<SetUpPages />

Docs content here.
```

- `import SetUpPages from '/snippets/_partial-name.md';` &mdash; A partial file that will be imported by other files
- `<SetUpPages />` &mdash; A component that imports content from the partial file. You can also use it to pass in data into the partial using props (See 'How to use props to pass different content on multiple pages?' below).
- `<SetUpPages />` &mdash; A component that imports content from the partial file. You can also use it to pass in data into the partial using props (See 'How to use props to pass different content on multiple pages?' below).

4. This will then render the content of the docs in the partial file.

Expand All @@ -276,32 +276,32 @@ Docs content here.

<details>
<summary><b>How to use props to pass different content on multiple pages?</b></summary><br />

You can add props on the component only if you want to pass in data from the component into the partial file. This is useful for using the same partial component on
multiple docs pages and displaying different values for each. For example, if we wanted to use a partial on multiple pages and pass in a different 'feature' for each
docs page, you can write it as:

```
```markdown
import SetUpPages from '/snippets/_available-enterprise-only.md';
`<SetUpPages feature='A really cool feature' />
<!-- It is important to leave a blank line or a comment between import and usage, otherwise it won't work -->
<SetUpPages feature='A really cool feature' />
```

Then in the `/snippets/_available-enterprise-only.md file`, you can display that feature prop with:

>This feature: `{props.feature}` other content etc...
This will then translate to:

>This feature: A really cool feature other content etc...
In this example, the component `<SetUpPages feature='` is passing 'feature' into the partial. This is useful when using dynamic data (for example if you wanted to use the same partial on multiple docs pages, but change the values within the partial for each page)

</details>

### Snippets

The Snippet component allows for content to be reusable throughout the Docs. This is very similar to the existing FAQ component. Using partial files, which is a built-in Docusaurus feature, is recommended over snippets.
The Snippet component allows for content to be reusable throughout the Docs. This is very similar to the existing FAQ component. Using partial files, which is a built-in Docusaurus feature, is recommended over snippets.

Creating and using a snippet requires two steps:

Expand Down
Loading

0 comments on commit 581daeb

Please sign in to comment.