Giter VIP home page Giter VIP logo

docs-1's Introduction

Pulumi Documentation Site

Build Status

Contributing

Before adding new content, read CONTRIBUTING.md.

Toolchain

The website is statically built using Hugo. So we have basic templating for generating HTML and the ability to write most files in Markdown.

TypeScript documentation is generated directly from source using TYPEDOC. We just check the resulting files directly into the repo under ./content/reference/pkg/nodejs.

Development

Prerequisites

Hugo

The website is powered by Hugo.

IMPORTANT. Recent versions of Hugo have bugs in the markdown renderer (Blackfriday) that prevents fenced code from rendering correctly in lists when a language is specified. Many of our tutorials are made up of ordered lists of steps, each step containing a code snippet. Until those bugs are fixed, and Hugo has adopted the version of Blackfriday with the fixes, we'll pin to Hugo v0.55.4. Tracking issue: pulumi#1091

macOS

The following commands use the package manager, Homebrew.

Install Hugo

If you already have Hugo installed, uninstall it:

brew uninstall hugo

Install Hugo v0.55.4:

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/cf3219506fd28f7133041b74761e8025418435a3/Formula/hugo.rb

To prevent brew from upgrading Hugo:

brew pin hugo
Install Go
brew install go

Linux (Ubuntu)

Install Hugo

The quickest way to install the extended version of Hugo v0.55.4 on your Linux machine is to use wget and the dpkg utility. For confirming your server architecture and post-installation cleanup, see Installing Hugo Using the dpkg utility.

wget https://github.com/gohugoio/hugo/releases/download/v0.55.4/hugo_extended_0.55.4_Linux-64bit.deb
sudo dpkg -i hugo_extended_0.55.4_Linux-64bit.deb

If you wish to use brew on Linux, see Homebrew on Linux.

Install Go

Download the Linux package from https://golang.org/dl/. Follow installation and setup steps on "Installing Go on Ubuntu".

Go-based Tools

There are several other Go-based tools to install as well.

go get -u github.com/cbroglie/mustache
go get -u github.com/gobuffalo/packr
go get -u github.com/pkg/errors
go get -u gopkg.in/russross/blackfriday.v2

Makefile

make ensure will run yarn install which resolves project dependencies.

make build will generate the website (published to public).

make serve will build the website and serve it to http://localhost:1313.

make test runs a broken link checker tool against http://localhost:1313.

make generate will regenerate the TypeScript documentation if needed, as well as the CLI documentation in content/references/cli. The generated API documentation is placed in the [/content/reference/pkg/nodejs]/content/reference/pkg/nodejs) folder. This is extremely hacky.

The following repos must be peers of docs, should be checked out to an appropriate branch, and should be built before running make generate:

  • pulumi
  • pulumi-aws
  • pulumi-azure
  • pulumi-cloud
  • pulumi-gcp
  • pulumi-kubernetes
  • etc.

Updating API docs

to update API docs for all Pulumi packages, run the following commands to fetch latest release of each package and rebuild docs into .content/reference/pkg folder:

./scripts/update_repos.sh
./scripts/run_typedoc.sh

To update a single package, make sure you have it checked out at the desired release label, and then run:

PKGS=yourpackagename ./scripts/run_typedoc.sh

Docs for additional packages can be added by updating ./scripts/run_typedoc.sh to include the package, and then updating ./config.toml to include the package in the TOC as a [[menu.reference]] entry.

Deploying updates

When changes are merged into master, https://www.pulumi.com/ is automatically deployed. You can use the Travis UI to check on the status of the deployment.

Design Reference

Web design is hard. Documentation is hard. Good web design for documentation is harder.

Examples of other sites and their docs as inspiration:

docs-1's People

Contributors

joeduffy avatar justinvp avatar metral avatar lindydonna avatar chrsmith avatar ellismg avatar spara avatar lukehoban avatar stack72 avatar pulumi-bot avatar bermudezmt avatar cnunciato avatar cyrusnajmabadi avatar jen20 avatar praneetloke avatar hausdorff avatar lblackstone avatar swgillespie avatar clstokes avatar andrewlayman avatar ericrudder avatar mikhailshilkov avatar pgavlin avatar mehzer avatar d-nishi avatar 4c74356b41 avatar frassle avatar aydrian avatar tirke avatar erinhyperplane avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.