Plotly welcomes contributions to its open-source graphing libraries documentation from its community of users.
This repository mainly serves:
-
Plotly's graphing libraries documentation index page at https://plotly.com/graphing-libraries.
-
Plotly's JavaScript graphing library documentation at https://plotly.com/javascript
- Please be aware that only the content of Plotly's JavaScript graphing library documentation (hosted at https://plotly.com/javascript) is contained in this repository. You can find the content in the
_posts/plotly_js
directory. - For information about editing plotly.js documentation click here.
- Please be aware that only the content of Plotly's JavaScript graphing library documentation (hosted at https://plotly.com/javascript) is contained in this repository. You can find the content in the
-
Plotly's Python graphing library documentation at https://plotly.com/python
- The content for Plotly's Python graphing library documentation (hosted at https://plotly.com/python) IS NOT contained in this repository. It is contained in the
plotly.py
repository at https://github.com/plotly/plotly.py/tree/master/doc and is cloned into this repository at build time. - For information about editing plotly.py documentation click here.
- The content for Plotly's Python graphing library documentation (hosted at https://plotly.com/python) IS NOT contained in this repository. It is contained in the
-
Plotly's R graphing library documentation at https://plotly.com/r
- The content for Plotly's R graphing library documentation (hosted at https://plotly.com/r) IS NOT contained in this repository. It is contained in the
plotly.r-docs
repository at https://github.com/plotly/plotly.r-docs/ and is cloned into this repository at build time. - For information about editing Plotly's R documentation click here.
- The content for Plotly's R graphing library documentation (hosted at https://plotly.com/r) IS NOT contained in this repository. It is contained in the
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:
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.
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.
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
- Download Ruby and check your
Ruby
version by running theruby --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.
-
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. -
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.
-
Serve the Jekyll application:
bundle exec jekyll serve --config _config_dev.yml
. -
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.
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.
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.