Code Monkey home page Code Monkey logo

chef-docs's Introduction

chef-docs

The source of the Chef documentation, located at http://docs.chef.io/

This README focuses on people who want to contribute to the Chef documentation.

Getting Started

Sphinx is the authoring tool: http://sphinx-doc.org/

reStructuredText (RST) is the authoring format. Only a subset of the formatting options are used, plus there are some specific approaches to what type of formatting goes where, so please review the style guide: http://docs.chef.io/style_guide.html

There are several ways to provide feedback about the Chef documentation. See http://docs.chef.io/feedback.html or read CONTRIBUTING.

Submitting PRs (or "Where do I make changes?")

To determine the location of the actual content on a page:

  1. Find the URL of that page on the root of docs.chef.io. For example, the template resource: https://docs.chef.io/resource_template.html
  2. In the chef-docs repo on Github (https://github.com/chef/chef-docs), open the chef_master directory and find the .rst file in that directory that corresponds exactly to the file on the docs site: resource_template.rst
  3. Open that file and view it in its raw text format. For example: https://raw.githubusercontent.com/chef/chef-docs/master/chef_master/source/resource_template.rst
  4. Find the section in which the change is to be made. In nearly every case that section is included using a pattern similar to: .. include:: ../../includes_resources/includes_resource_template_attributes.rst.
  5. In the chef-docs repo, follow that path to the directory, and then the specific file.
  6. Open that file and make your changes.

See http://docs.chef.io/style_guide.html for any questions about the structure and formatting of the individual topics.

Setting Up

Fork and clone the chef-docs repo to your own account://

git clone https://github.com/chef/chef-docs.git
# will take a while, repo is very large

You may wish to use virtualenv & virtualenvwrapper (similar to rvm or rbenv), to isolate this Python environment from others, so start out like so:

mkvirtualenv chef-docs
workon chef-docs
echo chef-docs > .venv # personal preference, can hook into other control projects later

If you don't use this and want to install into your system Python, prepend this command with sudo:

pip install sphinx

Will install all the dependencies you should need.

There are other ways to install Sphinx as well. For example:

brew install sphinx

for those using Homebrew.

Building Docs

There's a Makefile in the root of the repo, that should have the majority of the tasks you'll ever need.

Run:

make release

This will build all the documentation into HTML, and place it inside ./build/chef/. Open ./build/chef/index.html to view the rendered files locally.

IMPORTANT: Depending on what has changed since the last time a build was run, the build process can take anywhere from a few minutes to a few hours. The make file gets changed a lot because Chef uses this file to manage how the docs get published to our website. For your local builds, you may want to edit the make file prior to building to only use the chef_master build, which is the build to use for the current version of Chef.

The first time you run the build, it will take longer (45-75 mins), as it has to generate every file from scratch. (This time estimate assumes that you're building only the chef_master docs collection; additional docs collections will take additional time.)

This will also apply when you've run the make clean command, which effectively resets your working environment or if files located in the /swaps folder are changed.

Subsequent runs of make release should be relatively fast (2-5 mins), and you can use subsets. For example: master for the main docs build, server for the Chef server, client for the chef-client, and so on. The full list is available at the top of the makefile.

License

Creative Commons Attribution 3.0 Unported License

Questions?

Open an Issue and ask. Or send email to [email protected].

chef-docs's People

Contributors

sean-horn avatar d-higuchi avatar mattray avatar stevendanna avatar kwilczynski avatar jblaine avatar jamescott avatar zuazo avatar jeremiahsnapp avatar carmstrong avatar miketheman avatar cwebberops avatar juliandunn avatar pierrerambaud avatar jjshoe avatar tristanoneil avatar andor avatar mivok avatar coderanger avatar wmalik avatar marcparadise avatar hosh avatar rmoriz avatar prajaktapurohit avatar smith avatar mtyler avatar kylesloan avatar raskchanky avatar evtuhovich avatar ghudgens 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.