This repository is the home of all code and content for developers.teradata.com.
Contributions are welcome! To get started, review the contributor guide information in this README.
- This site is built using Docusaurus and uses markdown syntax in MDX.
- The
mainbranch is the default branch and reflects what’s currently published. Committing or merging a branch intomainautomatically triggers a web site update. - Contributors can submit simple content changes via pull request directly to the repo in GitHub. For larger changes, such as reformatting or adding a new page, Teradata recommends forking the repo, cloning it locally, and following the instructions on how to build the website locally before submitting a pull request.
- Each page corresponds to a Markdown file in the repository. Pages are located in the docs or quickstarts directories. Page files must have a
.mdor.mdxsuffix if using React components.
| Directory | Description | Sidebar Configuration |
|---|---|---|
| docs | Primary location for documentation pages main site | Metadata-driven with index.md |
| quickstarts | Quickstart guides and introductory workflows | Metadata-driven with _category_.json |
Thank you for your interest in contributing to developers.teradata.com project. Your contributions help improve and expand the resources available to the community.
Templates: See the templates directory for page examples, markdown syntax examples, and sidebar configuration explanations.
- Familiarity with MDX markdown syntax. To learn more, see the MDX web site.
- Familarity with GitHub and simple git branching principles. Teradata recommends installing GitHub Desktop to help manage branch activity and to clone the repository.
- Teradata recommends using VS Code with these extensions:
npminstalled for developer dependencies and building the site locally. For non-technical contributors, download and installnpmfor your operating system from the the node.js web site.
- Navigate to the docs or quickstarts folder in your project directory. Each MDX file corresponds to a page on the documentation site.
- Open the relevant file and make edits. Docusaurus supports Markdown with JSX extensions, allowing you to easily add React components if needed.
- Create a new Markdown file in the appropriate directory under docs or quickstarts.
- Add the necessary content to the Markdown file. Use this helpful guide and the Docusaurus feature reference to assist in creating a new document.
Docusaurus uses _partials to store snippets of markdown content for reuse.
Best Practice: To maximize reusability, reusable content should be relativetly short and discrete.
- In a
_partialsdirectory, create a Markdown file to store your snippet of content. - In the Markdown file, use the following syntax to relative reference to it:
import MyPartial from '../_partials/example-partial-path.md';
Docusaurus uses a static folder where you can place static assets such as images, videos, or files. Any file placed in this folder is automatically available at the root URL.
- Inside your Docusaurus project, navigate to the
staticfolder. - Create a subfolder inside
staticfor organization, e.g.,imgorfiles, to store your images or files. - Place your image or file in this folder, e.g.,
static/img/my-image.png.
Once your asset is in the static folder, you can reference it in your Markdown files using a relative path.
Tips
- Always place your images in the
staticfolder to ensure Docusaurus correctly handles the image path.- Use relative paths to link images, starting with
/, e.g.,/img/my-image.png.
- Use the Docusaurus MDX previewer extension to preview an individual page.
- To preview the entire site with your changes and to validate your change, run
npm startfrom the repository root for a local development server. If the server is already running, the site will automatically rebuild with the updated content.
To avoid duplicating content, follow these guidelines:
- Search the repository to check if the content already exists.
- If similar content exists, consider updating the existing content instead of creating new content.
- Coordinate with other contributors to ensure consistency and avoid duplication.
To serve the website locally, follow these steps:
- Run the development server using
npm run start. - Open your browser and navigate to
http://localhost:3000.
To build the documentation locally, follow these steps:
- Clone the repository to your local machine.
- Install the necessary dependencies using
npm install. - Build the documentation using
npm run build. - Preview the static build by running
cd build && npx http-server.
To ensure high-quality contributions and maintain consistency across the project, please follow these best practices:
- Use Clear and Concise Language: Write clearly and concisely to make the documentation easy to understand.
- Follow Markdown Standards: Use standard Markdown syntax and conventions to ensure consistency across all documents.
- Keep It Simple: Avoid overly complex explanations and technical jargon where possible. Aim to make the documentation accessible to a wide audience.
- Use Proper Formatting: Use headings, lists, and code blocks appropriately to organize content and improve readability.
- Provide Examples: Include examples and code snippets to illustrate concepts and make the documentation more practical.
- Review and Edit: Before submitting a pull request, review your changes for accuracy, clarity, and completeness. Edit as needed to ensure high quality.
- Collaborate and Communicate: Engage with other contributors and maintainers through comments, discussions, and reviews to ensure alignment and address any issues.
Sidebar placement and TOC building is metadata-driven. Two different implementations are currently in effect between the docs and quickstarts directories.
TOCs are generally managed by Teradata content architects and repo admins, who may modify sidebar metadata of any contributor pull requests.
- Each sub-directory is a section.
index.mdis the parent page of a directory, and thesidebar_positionin anindex.mddetermines the the ordering of entire sections relative to otherindex.mdfiles.- All other
.mdfiles are nested under theindex.mdfile in the same directory based on its position. - The same principles apply to directories further nested in a directory, but nesting deeper than two levels deep in a given sidebar is not recommended.
docs/
├── Section A / <-- Appears FIRST (Position 1)
│ ├── index.md ---
│ │ sidebar_position: 1
│ │ ---
│ └── child_page.md
│
├── Section B / <-- Appears SECOND (Position 2)
│ ├── index.md ---
│ │ sidebar_position: 2
│ │ ---
│ └── child_page.md
│
└── Section C / <-- Appears THIRD (Position 3)
├── index.md ---
│ sidebar_position: 3
│ ---
└── child_page.md
The result would look like this:
Section A (content of index.md)
Child (content of position 1)
Child (content of position 2)
Section B (content of index.md)
Child (content of position 1)
Child (content of position 2)
Section C (content of index.md)
Child (content of position 1)
Child (content of position 2)
The quickstarts uses the Docusaurus _category_.json method. In lieu of using index.md parent pages with content in a given sub-directory, the JSON files define the order of sub-directories relative to each other in the same way. The result is an expander title in the sidebar that does not equate to a page URL and content.
{
"label": "Title in Sidebar",
"position": 1
}In each sub-directory each .md still includes a sidebar_position metadata attribute that defines order within the sub-directory.
docs/
├── Section A / <-- Appears FIRST (Position 1)
│ ├── _category_.json ---
│ │ sidebar_position: 1
│ │ ---
│ └── child_page.md
│
├── Section B / <-- Appears SECOND (Position 2)
│ ├── _category_.json ---
│ │ sidebar_position: 2
│ │ ---
│ └── child_page.md
│
└── Section C / <-- Appears THIRD (Position 3)
├── _category_.json ---
│ sidebar_position: 3
│ ---
└── child_page.md
The result would look like this:
Section A (sidebar only - no content)
Child (content of position 1)
Child (content of position 2)
Section B (sidebar only - no content)
Child (content of position 1)
Child (content of position 2)
Section C (sidebar only - no content)
Child (content of position 1)
Child (content of position 2)