Skip to content

Latest commit

 

History

History
executable file
·
123 lines (80 loc) · 6.82 KB

README.md

File metadata and controls

executable file
·
123 lines (80 loc) · 6.82 KB

Contributing to Plotly's Graphing Libraries Documentation

Repo Overview

Plotly welcomes contributions to its open-source graphing libraries documentation from its community of users.

This repository mainly serves:

Contribute Quickly to Plotly's JavaScript Graphing Library Documentation

To quickly make a contribution to Plotly's JavaScript graphing libraries documentation, simply submit a pull request with the change you would like to suggest.

The easiest way to do this is to follow the Edit this page on GitHub link at the top right of the page you are interested in contributing to:

Screen Shot 2020-01-07 at 12 45 39 PM

Note: You don't have to worry about breaking the site when you submit a pull request!** This is because your change will not be merged to production immediately. A Plotly team member will first perform a code review on your pull request.

How To Get The Application Working Locally

For more extensive changes to Ploty's JavaScript documentation, we suggest getting the Jekyll application which builds the site to run locally so that you can test your changes as you develop them.

This involves cloning the repository and installing its dependencies: Git, [Ruby]((https://www.ruby-lang.org/en/), Jekyll, and the Python requests package.

  1. Use git to clone the public plotly/graphing-library-docs repository.

To do so, run the following commands in your terminal:

git clone git@github.com:plotly/graphing-library-docs.git
cd graphing-library-docs

Running git status in your terminal should then output the following:

On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
  1. Download Ruby and check your Ruby version by running the ruby --version command in your terminal.

Note: We recommend using version 2.7.4, the same ruby version as gh-pages. Note RVM is helpful for installing and managing ruby versions.

  1. Download Jekyll and check your Jekyll version by running the jekyll -v command in your terminal. We recommend using the same ruby version as gh-pages.

  2. Install bundler and dependencies from the Jekyll applicaton's Gemfile by running the following commands in your terminal:

gem install bundler
bundle install

Note: These dependencies should be the same version that gh-pages is using.

  1. Serve the Jekyll application: bundle exec jekyll serve --config _config_dev.yml.

  2. Visit the pages at: http://localhost:4000/

Note The default Jekyll configuration file only builds the JavaScript posts by excluding folders. If you want to override this behavior, serve the application with a custom Jekyll configuration file in the root of the repository. Do this by copying _config_dev.yml, renaming it _config_personal.yml, and modifying the exclude statement.

  • If you name the Jekyll configuration file _config_personal.yml, it will be caught by the .gitignore file and not committed to version control.

  • Run bundle exec jekyll serve --config _config_personal.yml to use the custom configuration file

  • Example configuration:

# ---
# Excludes every directory except JavaScript
# ---
exclude: ['_posts/reference_pages', _posts/ggplot2','_posts/julia','_posts/matlab','_posts/node_js','_posts/r','_posts/python','_posts/python-v3','_posts/misc','_posts/dashboards',_posts/scala', '_posts/nodejs', 'node_modules']

and you'll only load the files in _posts/plotly_js directory because that is the only directory that is not excluded.

Change it to this:

# ---
# Excludes no directory
# ---
staticurl: http://localhost:4000/all_static
exclude: []

and you'll load every file because no directories are excluded.

Continuous Integration

Whenever a pull request is made, a continuous integration workflow is initiated. This includes of: - running the check-or-enforce-order.py and front-matter-ci.py scripts inside of a Docker container to validate YAML front-matter - Percy screenshot testing

Making sure that a pull request passes every continuous integration test is a part of the code review process.

For more information about the build process, inspect the CircleCI configuration file in this repository at https://github.com/plotly/graphing-library-docs/blob/master/.circleci/config.yml.

Other Documentation

This repository also contains: - Plotly's Node.js, Matlab, Scala, Julia, and Python V3 graphing libraries documentation - the reference pages for Plotly's JavaScript, Python, R, and Matlab graphing libraries.