This repository hosts all of the hand-crafted documentation, guides, tutorials, blogs, and landing pages that you see on https://pulumi.com, as well as all of the assets and templates we use to render the Pulumi website. It also houses the documentation that we generate for the Pulumi CLI and language SDKs, and it's responsible for building and deploying the website (with Pulumi, of course!).
- Pulumi AI: You'll find the open-source components of the Pulumi AI project at https://github.com/pulumi/pulumi-ai.
- Pulumi Registry: You'll find everything related to the Registry at https://github.com/pulumi/registry.
We welcome all contributions to this repository. Be sure to read our contributing guide and code of conduct first, then submit a pull request here on GitHub. If you see something that needs fixing but don't have time to contribute, you can also file an issue.
See also:
We build the Pulumi website with Hugo, manage our dependencies with Node.js and Yarn, and write our documentation in Markdown. Below is a list of the tools you'll need if you'd like to work on the website (e.g., to contribute docs content, a blog post, etc.):
- Hugo (>= 0.126.0)
- Hugo 0.126.0 is highly recommended. This is the version we use in our deployment pipelines.
- Node.js (>= 18)
- Yarn (1.x)
Additionally, to build the SDK and CLI documentation, you'll also need:
- Go (>= 1.21)
- Python (>= 3.7)
- .NET (>= 6)
- Pulumi
- Pulumi ESC
-
Documentation and page content: We generally follow Hugo's directory-structure conventions, with Markdown files in
./content
, layout files (including partials and shortcodes) in./layout
, and data files in./data
. There are also several Hugo templates available in./archetypes
for bootstrapping common content types like blog posts and Learn modules. -
CSS and JavaScript: We build our CSS and JavaScript bundles separately from Hugo and check in the built artifacts at
./assets
. We use Tailwind for CSS, Stencil for web components, and jQuery for wiring things together in general. Source files for these are in./theme
. -
Examples: Many of the examples we include in our documentation are maintained as full Pulumi programs and tested daily. You'll find them all at
./static/programs
. -
Infrastructure: We deploy the website as a statically built artifact to a unique Amazon S3 bucket on every commit to the base branch of this repo. The Pulumi program that handles this is located in
./infrastructure
. This is also where you'll find the CloudFront configuration that handles proxying Pulumi AI and the Pulumi Registry.
The Makefile
exposes a number of useful helpers for authoring:
make ensure
resolves and installs all dependenciesmake lint
checks all Markdown files for correctnessmake format
formats all applicable files to ensure they conform to style guidelinesmake serve
runs the Hugo server locally at http://localhost:1313 and watches for changesmake serve-all
does the same asmake serve
, but also watches for changes to CSS and JS source filesmake build
generates the website and writes it to./public
make build-assets
builds only the CSS and JavaScript asset bundlesmake serve-static
runs a local HTTP server that serves the contents of./public
make test
tests all of the programs in./static/programs
(see./scripts/programs/test.sh
for options)make generate
builds the TypeScript, Python, and Pulumi CLI documentationmake new-blog-post
scaffolds a new, bare-bones blog post with placeholder contentmake new-example-program
generates a new multi-language set of examples at./static/programs
As a content contributor, the commands you'll use most often are these:
make ensure # Install or update dependencies.
make serve # Run the development server locally on http://localhost:1313.
make lint # Identify any Markdown or code-formatting issues so you can fix them.
We generate two kinds of reference documentation with this repository: language-specific SDK docs (for a subset of Pulumi packages) and CLI docs (for command-line tools like pulumi
and esc
). Instructions for generating both types of docs are listed below.
We build and host language-specific SDK documentation for the following Pulumi packages:
The Node.js, Python, and .NET versions of these docs are built using language-specific tooling and checked into the repository as stand-alone docsets. (Go versions are sourced directly from GitHub and hosted at pkg.go.dev.)
To build the docs for these packages yourself, you'll first need to clone each package into a sibling directory. The easiest way to do this is to use the make update-repos
helper:
# Clone and update all of the repositories above into sibling directories of this repo.
make update-repos
Once you've done this, you can generate the docs for each package.
The Node and Python SDK docs are built with TypeDoc and Pydocgen. The easiest way to generate these docs is to use the make generate
helper:
make ensure # Install dependencies.
make update-repos # Clone and update all package repositories.
make generate # Generate the Node.js and Python docs for all packages.
Generated docs are rendered into the ./static-prebuilt/nodejs
and ./static-prebuilt/python
folders. At deploy-time, we copy the contents of these folders into ./docs/reference/pkg
to make them available on pulumi.com -- for example, here and here.
See below to learn how to view these rendered docs locally.
The .NET SDK docs are built with Docfx. To generate these, you'll need both dotnet
and docfx
installed and on your PATH. For example, assuming you've already installed the dotnet
executable for your platform, you can:
make ensure # Install dependencies.
make update-repos # Clone and update all package repositories.
dotnet tool install -g docfx # Install docfx globally, following the instructions to ensure it's on your PATH.
docfx build docfx/docfx.json # Generate the .NET docs.
The make generate
helper also generates the Pulumi CLI documentation. If you'd prefer not to use that helper (e.g., to avoid having to clone all the repos and generate SDK docs), you can build them directly using the pulumi
and esc
CLIs:
pulumi gen-markdown ./content/docs/cli/commands # Generate Pulumi CLI documentation.
esc gen-docs ./content/docs/esc-cli/commands # Generate Pulumi ESC CLI documentation.
Generated docs reflect the functionality of the currently installed CLI, so make sure you've installed the latest public version of each one (pulumi
, esc
) before running these commands and submitting your PR.
After building the SDK and/or CLI docs, you can view them locally with make build
and make serve-static
.
For example, from a fresh clone of this repository, you can install all dependencies and generate and browse the Node.js, Python, and Pulumi CLI docs using the following sequence:
make ensure # Install dependencies.
make update-repos # Clone and update all package repositories.
make generate # Generate the Node.js, Python, and Pulumi CLI docs.
make build # Build the website, copying all generated docs into place.
make serve-static # Serve the built website statically to make sure everything looks right.
With make serve-static
running, you can browse to the docs by navigating to http://localhost:8080/docs. Then, from the left-hand menu:
- Choose Languages & SDKs followed by your language of choice, then scroll to the bottom of the page to find the package you're interested in
- Choose Pulumi CLI or Pulumi ESC CLI, then Commands
All generated docs, including all Node.js, Python, and .NET SDK docs and all Pulumi and Pulumi ESC CLI docs, get checked into this repository.
The pulumi-hugo repository was archived on May 16, 2024. This repository previously housed most of our website content. This content has now moved to this repository. There is a slight directory structure change in this repo compared to pulumi-hugo. For the most part, everything that was located under the themes/default
directory in pulumi-hugo now lives under the root directory of this repository, i.e. themes/default/content/blog
is now under /content/blog
. Everything still functions the same way it did previously when it comes to local devleopment, e.g. make ensure
, make serve
, make build-assets
, etc.
If you have open pull requests in the pulumi-hugo repo, here are the steps to follow in order to move them over to the docs repository. You will need to copy over your files to the docs repo and place them in the new directory location.
- Clone the docs repo if you haven't done so already.
- Create a new branch in the docs repository.
- Copy the files you changed/added to the docs repo. The directory structure is similar to how this repo was configured, except everything under themes/default has been moved to the root. For example, if you have a blog under
themes/default/content/blog/my-cool-blog
, you will need to relocate it undercontent/blog/my-cool-blog
in the docs repo. - Run make ensure in the docs repo and then a make serve to verify the files have been moved correctly.
- Push changes to the docs repo.
- Open a PR in the docs repo to add the changes there.