Coder Social home page Coder Social logo

spam4kev / docs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pulumi/docs

0.0 1.0 0.0 31.12 MB

Documentation for all things Pulumi!

Home Page: https://pulumi.io

HTML 12.94% Dockerfile 0.13% Ruby 1.15% Makefile 1.14% CSS 43.68% TypeScript 4.39% JavaScript 6.94% Shell 4.76% Python 8.47% Go 16.39%

docs's Introduction

Pulumi Documentation Site

"Because knowing is half the battle."

Staging Production
Build Status Build Status

Contributing

Before adding new content, read CONTRIBUTING.md.

Toolchain

The website is statically built using Jekyll. 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 ./packages/.

Development

Prerequisites

  • Install a recent version of Ruby
  • Install the necessary Ruby Gems: gem install jekyll bundler
  • Install a recent version of Go
  • Install mustache: go get -u github.com/cbroglie/mustache

Run make configure to get the required Gem dependencies. (Assuming you have a recent Ruby installation on your system.

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

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

make docker will run build and serve in a docker container with all prerequisites installed.

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

make generate will regenerate the TypeScript documentation if needed, as well as the CLI documentation in references/cli. The generated API documentation is placed in the packages 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

Updating API docs

to update API docs for all Pulumi packages, run the following commands to fetch latest release of each pacakge and rebuild docs into ./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 pacakges can be added by updating ./scripts/run_typedoc.sh to include the package, and then updating ./_data/reference.yaml to include the package in the TOC.

Deploying updates

When changes are merged into master our staging website (https://staging.pulumi.io/) is automatically deployed. You can use the Travis UI to check on the status of the deployment. Once it has been deployed, browse around the staging website and ensure the changes you expected were made and render correctly. Then, open a Pull Request to merge master into production.

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:

Creating shortlinks

Shortlinks can be created as a permanent reference to documentation that may move around in the repo. This is particularly useful for troubleshooting links that are produced by CLI tools.

To create a shortlink, create a file under /shortlinks in the following format:

---
redirect_to: <link-to-current-docs-page>
permalink: <unique-6-character-shortlink>/
---

You can use the scripts/create_short_url.sh script to generate a new random shortlink:

./scripts/create_short_url.sh /reference/troubleshooting#ingress-status-loadbalancer ingress-status-loadbalancer

Created shortlink definition at <filepath>/ingress-status-loadbalancer.md
https://pulumi.io/xdv72s --> https://pulumi.io/reference/troubleshooting#ingress-status-loadbalancer

or you can choose a shortlink:

./scripts/create_short_url.sh /reference/troubleshooting#ingress-status-loadbalancer ingress-status-loadbalancer help/ingress-lbstaus


Created shortlink definition at <filepath>/ingress-status-loadbalancer.md
https://pulumi.io/help/ingress-lbstatus --> https://pulumi.io/reference/troubleshooting#ingress-status-loadbalancer

Here is a concrete example:

---
redirect_to: /reference/troubleshooting.html#ingress-status-loadbalancer
permalink: xdv72s/
---

With the above file in place, a redirect will be created from https://pulumi.io/xdv72s to https://pulumi.io/reference/troubleshooting.html#ingress-status-loadbalancer

Note that the trailing / on the permalink is required!

docs's People

Contributors

joeduffy avatar lindydonna avatar chrsmith avatar ellismg avatar lukehoban avatar justinvp avatar jen20 avatar hausdorff avatar swgillespie avatar metral avatar cyrusnajmabadi avatar clstokes avatar andrewlayman avatar mehzer avatar lblackstone avatar 4c74356b41 avatar pgavlin avatar ericrudder avatar frassle avatar cnunciato avatar praneetloke avatar tirke avatar eric-gonzales avatar scty-tpaoletti avatar octocruise avatar jkogut avatar wilsonmar avatar swasifali avatar timcondit avatar shanemcd avatar

Watchers

spam4kev 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.