Note: For theme documentation, see the theme README.
Hugo is a golang static site generator.
- Open a terminal.
- Run the following or view their official quickstart guide:
brew install hugo
- Open a terminal.
- Navigate to a directory like
/Documents/GitHub/
. - Run the following:
gh repo clone pachyderm/docs
Tip: Don't have the GitHub client yet? brew install gh
.
Our documentation is served on two sites:
- Open Source: https://docs.pachyderm.com
- Enterprise (HPE MLDM): https://mldm.pachyderm.com
To handle the varying nuances required by both doc sites (theming, content variables), we keep the markdown content separated as a submodule repo (pachyderm/docs-content
) to be ingested by our site repos (which contain the netlify, hugo, theme config).
- Navigate into the project directory.
cd docs
- Run the following:
git submodule init git submodule update
- Open a terminal.
- Navigate into the
/docs
root directory. - Run the following:
hugo server
- View your docs at the listed url (typically
localhost:1313
).
Most content and styling changes will hot-reload instantly, however the following changes may require you to restart your local server:
- significant changes to javascript in the
/assets
folder - significant restructuring of directories (moving sub-directories from one to another)
- Markdown All in One: provides styling shortcuts for bold, italics, links, & more.
- YAML: frontmatter & config details are in YAML.
Tip: Like CMS vibes? try using the Front Matter CMS UI plugin.
When contributing, we recommend creating a branch with the following naming convention:
<gitHubHandle>/<optionalRelatedTicketNumber>/change-title-here
# lbliii/doc-111/update-docs-readme
Note: You will need to create a branch on both the docs`` repo and the
docs-content` repo to enable deployment preview.
- Open the docs repo in a text editor.
- Pull any changes since your last use of the docs.
- Create a new
docs
repo branch. - Create a matching
docs-content
repo branch under the/content
directory. - Navigate to the markdown file you wish to update.
- Make, stage, and commit your changes.
- Create a pull request.
- Tag someone at Pachyderm for approval (
@lbliii
if SME unknown).
- Open the docs repo in a text editor.
- Pull any changes since your last use of the docs.
- Create a new
docs
repo branch. - Create a matching
docs-content
repo branch under the/content
directory. - Navigate to a place in the
/content
folder you wish to make a new file or folder.
- Create a new
.md
file. - Insert the following frontmatter template:
--- # metadata # title: description: date: yyyy-mm-dd # taxonomy # tags: # ["",""] series: #[""] seriesPart: weight: # optional ordered ranking ---
- Begin writing!
- Create a new folder.
- Create a new markdown file titled
_index.md
inside the new folder. This is the parent article. - Insert the following frontmatter template:
--- # metadata # title: description: date: yyyy-mm-dd # taxonomy # tags: # ["",""] series: #[""] seriesPart: weight: # optional ordered ranking layout: # "glossary" if applicable ---
- Begin writing!
You can use this mermaid live editor tool to build diagrams before putting them in the documentation.
Use the following shortcode in your markdown files to display notices:
{{% notice tip/warning/note/danger/info %}}
Content Here
{{%/notice %}}
Use this table generator tool to quickly build markdown tables.
- Open the docs repo and create a new branch named similar to:
/username/2.4.x/release-prep
. - Copy the most recent release directory in
/content
and give it the new release version name (e.g.,2.4.x
). - Navigate to your new release directory's top
_index.md
file. - Update the following front-matter attributes:
--- # metadata # title: 2.4.x description: Pachyderm Version 2.4.x date: # taxonomy # tags: series: seriesPart: cascade: latestPatch: 2.4.0 majorMinor: 2.4 clientPython: 7.3 extensionJupyterLab: 0.6.3 mountServerBinary: 2.4 ---
- Open the
config.yaml
file. - Find the following section and update to the new version:
## Release Features
versionDropdown: true # displays a top-nav dropdown with top-level sections served as versioned documentation.
## downloads: true # Enables displaying the download dropdown (requires release.patch)
releaseInfo: # Note: See the new directory's /content/x.x.x./_index.md page to set release-related frontmatter variables.
latest: "2.4.x" # displays matching directory's sections on home page; if blank, all directories are displayed.
patch: "2.4.0" # Used for announcements and to generate download links
- Open the
netlify.toml
file. - Update the redirects for
/latest
to point to the new version. (This step may be deprecated in the future.)
You now have a staged release branch that is ready for all of your new major/minor release documentation updates. You can submit this as a pull request, set that to draft, and safely share previews of the next version for feedback.
Pachyderm often releases new pachctl commands in major/minor releases. You can auto-generate markdown docs for these commands from the Pachyderm repo and then migrate them to the docs site. This should be done closer to the release date to ensure all changes are captured.
- Open the Pachyderm repo.
- In a terminal, run
make install-doc
. - Run
sh ./etc/build/reference_refresh.sh
. - Copy the files that get generated.
- Open the docs repo.
- Replace the pachctl command reference files with the newly generated ones.
- Open the Pachyderm repo.
- In the terminal, navigate to the
python-sdk/
directory. - run the following:
make docs
- Navigate to the docs site (either locally or deploy preview).
- Add the following to the path:
/{{version}}/index.json
. - Copy the JSON.
- Log in to Algolia.
- Create a new index with the version name. (e.g.,
2.4.x
). - Add the records by selecting add records > add manually and pasting in the json.
- Open the docs repo and navigate to the latest release directory's top-level
_index.md
page (e.g.,/content/2.4.x/_index.md
. - Update the
latestPatch
attribute value. - Open the
config.yaml
file. - Update the
releaseInfo.patch
attribute value.