Skip to content

Commit 0320078

Browse files
author
Joseph Damiba
committed
initial repo setup
0 parents  commit 0320078

File tree

2,565 files changed

+1011971
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,565 files changed

+1011971
-0
lines changed

.circleci/config.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
version: 2
2+
jobs:
3+
build:
4+
branches:
5+
ignore:
6+
- gh-pages
7+
8+
docker:
9+
# a packaged system that has the instructions for creating a running container.
10+
- image: circleci/ruby:2.3.3
11+
12+
# actions that need to be taken to perform your job
13+
steps:
14+
- add_ssh_keys:
15+
fingerprints:
16+
- "dc:5f:39:48:00:b4:72:34:e1:d2:c4:e1:1f:d1:e2:ce" #plotlydocbot
17+
18+
- restore_cache:
19+
keys:
20+
- source-v1- #one time, not every time!
21+
22+
# checks out the source code for a job over SSH
23+
- checkout
24+
25+
- save_cache:
26+
key: source-v1-1 # Sept 7, 2019
27+
paths:
28+
- ".git"
29+
30+
- restore_cache:
31+
keys:
32+
- gem-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
33+
- gem-cache-v1-{{ arch }}-{{ .Branch }}
34+
- gem-cache-v1
35+
36+
- run:
37+
name: install dependencies
38+
command: |
39+
bundle install --path vendor/bundle
40+
sudo apt-get update
41+
sudo apt install python-pip
42+
sudo pip install python-frontmatter
43+
sudo pip install pathlib
44+
45+
- save_cache:
46+
key: gem-cache-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
47+
paths:
48+
- vendor/bundle
49+
50+
- run:
51+
name: deployment
52+
command: |
53+
git config --global user.email "accounts@plot.ly"
54+
git config --global user.name "plotlydocbot"
55+
echo
56+
echo "token: ${mapbox_token}" > _data/mapbox_token.yml
57+
rm -rf _posts/python/html
58+
rm -rf _posts/r/md
59+
git clone -b built git@github.com:plotly/plotly.py-docs _posts/python/html
60+
git clone -b built git@github.com:plotly/plotly.r-docs _posts/r/md
61+
mv _posts/r/md/ggplot2 _posts/ggplot2/md
62+
python front-matter-ci.py _posts
63+
python check-or-enforce-order.py _posts/python
64+
python check-or-enforce-order.py _posts/python-v3
65+
python check-or-enforce-order.py _posts/r/
66+
python check-or-enforce-order.py _posts/plotly_js
67+
bundle exec jekyll build
68+
rm _data/mapbox_token.yml
69+
mkdir snapshots
70+
cd _site
71+
cp -r 'all_static' '../snapshots'
72+
cp 'api/index.html' '../snapshots'
73+
cp --parents 'python/index.html' '../snapshots'
74+
cp --parents 'python/getting-started/index.html' '../snapshots'
75+
cp --parents 'python/plotly-fundamentals/index.html' '../snapshots'
76+
cp --parents 'python/line-and-scatter/index.html' '../snapshots'
77+
cp --parents 'r/index.html' '../snapshots'
78+
cp --parents 'r/getting-started/index.html' '../snapshots'
79+
cp --parents 'r/plotly-fundamentals/index.html' '../snapshots'
80+
cp --parents 'r/line-and-scatter/index.html' '../snapshots'
81+
cp --parents 'javascript/index.html' '../snapshots'
82+
cp --parents 'javascript/plotly-fundamentals/index.html' '../snapshots'
83+
cp --parents 'javascript/getting-started/index.html' '../snapshots'
84+
cp --parents 'javascript/line-and-scatter/index.html' '../snapshots'
85+
cp --parents 'ggplot2/index.html' '../snapshots'
86+
cp --parents 'ggplot2/getting-started/index.html' '../snapshots'
87+
cp --parents 'ggplot2/geom_abline/index.html' '../snapshots'
88+
cp --parents 'python/v3/index.html' '../snapshots'
89+
cp --parents 'python/v3/plotly-fundamentals/index.html' '../snapshots'
90+
cp --parents 'python/v3/getting-started/index.html' '../snapshots'
91+
cp --parents 'python/v3/line-and-scatter/index.html' '../snapshots'
92+
cp --parents 'matlab/index.html' '../snapshots'
93+
cp --parents 'matlab/getting-started/index.html' '../snapshots'
94+
cp --parents 'matlab/graphing-multiple-chart-types/index.html' '../snapshots'
95+
cp --parents 'matlab/scatter/index.html' '../snapshots'
96+
cd ..
97+
rm -f 'snapshots/all_static/javascripts/jquery-knob/index.html'
98+
rm -f 'snapshots/all_static/images/Plotly-feed2.html'
99+
rm -f 'snapshots/all_static/images/Plotly.html'
100+
rm -f 'snapshots/all_static/images/Plotly-Feed.html'
101+
sed -i.bkp 's/drift\.load/console\.log/g' snapshots/*.html
102+
sed -i.bkp 's/drift\.load/console\.log/g' snapshots/*/*.html
103+
sed -i.bkp 's/drift\.load/console\.log/g' snapshots/*/*/*.html
104+
rm -f snapshots/*.bkp
105+
rm -f snapshots/*/*.bkp
106+
rm -f snapshots/*/*/*.bkp
107+
percy snapshot snapshots --enable_javascript
108+
rm -rf 'snapshots/'
109+
if [ "${CIRCLE_BRANCH}" == "test-gld-ci-setup" ]; then
110+
git clone --depth=1 --branch=test-gld-ci-setup https://github.com/plotly/documentation.git
111+
git config user.name plotlydocbot
112+
git config user.email accounts@plot.ly
113+
cp -r _site/* documentation
114+
cd documentation
115+
git add .
116+
git commit -m "deploying https://github.com/plotly/graphing-libraries-docs/commit/${CIRCLE_SHA1}"
117+
git push
118+
cd ..
119+
rm -rf documentation
120+
fi

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: https://plot.ly/products/consulting-and-oem/

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
*.ipynb_checkpoints
2+
*.pyc
3+
*.idea
4+
*.DS_Store
5+
.*.swp
6+
users.json
7+
port.sh
8+
*~
9+
_site
10+
_posts/user_guide_python/streaming-template.ipynb
11+
12+
node_modules
13+
14+
.RData
15+
.Rhistory
16+
.sass-cache
17+
.DS_Store
18+
.jekyll-metadata
19+
.mapbox_token
20+
21+
vendor/bundle
22+
.bundle
23+
_posts/python/fundamentals/static-image/images
24+
_config_personal.yml
25+
_posts/python/html
26+
.Rproj.user
27+
documentation.Rproj
28+
.vscode
29+
_posts/r/md
30+
_posts/ggplot2/md
31+
32+
_data/mapbox_token.yml

404.html

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
name: 404
3+
language: Page Not Found
4+
---
5+
6+
<!DOCTYPE html>
7+
<html>
8+
{% include layouts/head.html %}
9+
10+
11+
<body data-spy="scroll" data-target=".watch" style="position:relative;">
12+
{% include layouts/google-tag-body.html %}
13+
14+
<!--[if lt IE 10]>
15+
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade
16+
your browser</a> to improve your experience.</p>
17+
<![endif]-->
18+
19+
{% include layouts/lang-splash-banner.html %}
20+
21+
{% include layouts/_header-main.html %}
22+
23+
<main class="--page page--single --index not-found">
24+
25+
<div class="--wrap">
26+
<!-- aside - Main Sidebar-->
27+
<!-- Main-->
28+
<section class="--page-body --full-width">
29+
30+
<section class="content">
31+
32+
<div class="page404">
33+
<div class="page404-heading">
34+
4<div class="page404-bars">
35+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="40px" height="40px" viewBox="0 0 304.128 246.216" enable-background="new 0 0 304.128 246.216"
36+
xml:space="preserve">
37+
<g>
38+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF"
39+
d="M125.3,123.066c0,40.407-0.008,80.813,0.031,121.219
40+
c0.001,1.588-0.347,1.932-1.57,1.926c-10.917-0.061-21.834-0.032-32.751-0.039c-1.731-0.001-1.558,0.249-1.558-1.894
41+
c-0.003-80.813,0-161.625-0.026-242.438c0-1.378,0.196-1.848,1.408-1.841c11.037,0.065,22.074,0.058,33.111,0.009
42+
c1.067-0.005,1.384,0.29,1.383,1.688C125.293,42.154,125.3,82.61,125.3,123.066z"/>
43+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF"
44+
d="M214.786,140.75c0,34.522-0.008,69.046,0.027,103.568
45+
c0.001,1.483-0.252,1.905-1.491,1.898c-11.078-0.068-22.156-0.065-33.234-0.001c-1.169,0.006-1.25-0.556-1.25-1.735
46+
c0.019-69.244,0.02-138.49-0.007-207.734c0-1.291,0.222-1.676,1.307-1.67c11.118,0.055,22.236,0.055,33.354,0.001
47+
c1.067-0.005,1.319,0.343,1.317,1.656C214.779,71.405,214.786,106.078,214.786,140.75z"/>
48+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF"
49+
d="M134.18,158.268c0-28.739,0.007-57.477-0.022-86.215
50+
c-0.001-1.324,0.222-1.744,1.353-1.738c11.079,0.058,22.158,0.052,33.237,0.006c1.006-0.004,1.25,0.337,1.25,1.574
51+
c-0.025,57.576-0.025,115.151-0.001,172.728c0.001,1.222-0.225,1.588-1.241,1.582c-11.119-0.047-22.238-0.046-33.357,0
52+
c-1.009,0.006-1.241-0.345-1.24-1.573C134.187,215.844,134.18,187.056,134.18,158.268z"/>
53+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF"
54+
d="M223.665,193.287c0-16.962,0.013-33.925-0.024-50.887
55+
c-0.003-1.355,0.265-1.732,1.372-1.726c11.079,0.054,22.157,0.051,33.235,0.001c1.022-0.003,1.234,0.365,1.233,1.583
56+
c-0.026,34.125-0.026,68.25,0.001,102.375c0.001,1.229-0.23,1.579-1.24,1.573c-11.118-0.046-22.236-0.046-33.355,0
57+
c-1.014,0.006-1.246-0.354-1.244-1.58C223.675,227.511,223.665,210.4,223.665,193.287z"/>
58+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF"
59+
d="M44.694,211.117c0-11.222,0.018-22.443-0.024-33.663
60+
c-0.004-1.296,0.228-1.672,1.31-1.667c11.114,0.054,22.229,0.048,33.343,0.005c1.004-0.003,1.27,0.352,1.269,1.588
61+
c-0.028,22.442-0.028,44.885-0.001,67.327c0.001,1.176-0.252,1.501-1.2,1.496c-11.194-0.041-22.389-0.04-33.583-0.001
62+
c-0.906,0.003-1.136-0.31-1.133-1.424C44.707,233.558,44.694,222.337,44.694,211.117z"/>
63+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF"
64+
d="M286.165,246.176c-5.557,0-11.113-0.032-16.67,0.028
65+
c-0.965,0.012-1.179-0.348-1.175-1.5c0.034-10.721,0.033-21.441,0.001-32.163c-0.003-1.128,0.183-1.516,1.165-1.511
66+
c11.152,0.047,22.306,0.046,33.459,0.001c0.964-0.003,1.179,0.347,1.176,1.499c-0.035,10.721-0.042,21.442,0.007,32.162
67+
c0.006,1.332-0.357,1.518-1.294,1.509C297.277,246.151,291.721,246.176,286.165,246.176z"/>
68+
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF"
69+
d="M17.89,246.176c-5.599,0-11.197-0.019-16.796,0.021
70+
c-0.801,0.006-1.097-0.201-1.094-1.295c0.033-10.874,0.03-21.749,0.002-32.623c-0.002-1.002,0.248-1.24,1.016-1.238
71+
c11.237,0.028,22.475,0.035,33.711-0.009c0.943-0.003,1.105,0.387,1.103,1.452c-0.029,10.774-0.033,21.55,0.004,32.324
72+
c0.004,1.154-0.28,1.4-1.151,1.393C29.087,246.153,23.488,246.176,17.89,246.176z"/>
73+
</g>
74+
</svg>
75+
</div>4
76+
</div>
77+
78+
79+
<div class="page404-txt">
80+
<h3>Plot twist!</h3>
81+
<br />
82+
<h5>There's nothing here...</h5><br />
83+
<h5> <a href="https://plot.ly/graphing-libraries">Back to Graphing Libraries documentation</a></h5>
84+
</div>
85+
</div>
86+
87+
</section>
88+
</section>
89+
</div>
90+
</main>
91+
{% include layouts/helpbox.html %}
92+
93+
{% include layouts/_footer-main.html %}
94+
</body>
95+
96+
</html>

Contributing.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Contributing to Plotly's Graphing Libraries Documentation
2+
3+
## Repo Overview
4+
5+
Plotly welcomes contributions to its [open-source graphing libraries documentation](https://plot.ly/graphing-libraries) from its community of users.
6+
7+
This repository mainly serves:
8+
- Plotly's graphing libraries documentation index page at https://plot.ly/graphing-libraries.
9+
10+
- Plotly's JavaScript graphing library documentation at https://plot.ly/javascript
11+
- Please be aware that **only the content of Plotly's JavaScript graphing library documentation** (hosted at https://plot.ly/javascript) is contained in this repository. You can find the content in the `_posts/plotly_js` directory.
12+
- For information about editing **plotly.js** documentation [click here](https://github.com/plotly/documentation/blob/source-design-merge/_posts/plotly_js/README.md).
13+
14+
- Plotly's Python graphing library documentation at https://plot.ly/python
15+
- The content for Plotly's Python graphing library documentation (hosted at https://plot.ly/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.
16+
- For information about editing **plotly.py** documentation [click here](https://github.com/plotly/plotly.py/blob/master/doc/README.md).
17+
18+
- Plotly's R graphing library documentation at https://plot.ly/r
19+
- The content for Plotly's R graphing library documentation (hosted at https://plot.ly/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.
20+
- For information about editing Plotly's **R** documentation [click here](https://github.com/plotly/plotly.r-docs/blob/master/README.md).
21+
22+
## Contribute Quickly to Plotly's JavaScript Graphing Library Documentation
23+
24+
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.
25+
26+
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:
27+
28+
![Screen Shot 2020-01-07 at 12 45 39 PM](https://user-images.githubusercontent.com/1557650/71916356-bfe53800-314b-11ea-92b6-eb763037f6d5.png)
29+
30+
**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.
31+
32+
## How To Get The Application Working Locally
33+
34+
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.
35+
36+
This involves cloning the repository and installing its dependencies: [Git](https://git-scm.com/), [Ruby]((https://www.ruby-lang.org/en/), [Jekyll](https://jekyllrb.com/), and the [Python `requests` package](https://pypi.org/project/requests/).
37+
38+
1. Use [`git`](https://git-scm.com/) to [clone](https://git-scm.com/docs/git-clone) the public `plotly/documentation` repository. Then [check out] (https://git-scm.com/docs/git-checkout) the source-design-merge branch of the `git` repository.
39+
40+
To do so, run the following commands in your terminal:
41+
42+
```sh
43+
git clone git@github.com:plotly/documentation.git
44+
git fetch origin
45+
git checkout source-design-merge
46+
```
47+
48+
**Note:** For historical reasons, the `source-design-merge` branch is the `master` branch of this repository.
49+
50+
Running `git status` in your terminal should then output the following:
51+
52+
```sh
53+
On branch source-design-merge
54+
Your branch is up to date with 'origin/source-design-merge'.
55+
56+
nothing to commit, working tree clean
57+
```
58+
59+
2. Download Ruby and check your `Ruby` version by running the `ruby --version` command in your terminal.
60+
61+
**Note:** We recommend using `version 2.3.3` or the same ruby version as [gh-pages](https://pages.github.com/versions/). Note [RVM](https://rvm.io/rvm/install) is helpful for installing and managing ruby versions.
62+
63+
3. 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](https://pages.github.com/versions/).
64+
65+
4. Install bundler and dependencies from the Jekyll applicaton's [`Gemfile`](https://github.com/plotly/documentation/blob/source-design-merge/Gemfile) by running the following commands in your terminal:
66+
67+
```sh
68+
gem install bundler
69+
bundle install
70+
```
71+
72+
**Note:** These dependencies should be the same version that [gh-pages](https://pages.github.com/versions/) is using.
73+
74+
5. Serve the Jekyll application: `bundle exec jekyll serve --config _config_dev.yml`.
75+
76+
6. Visit the pages at: [http://localhost:4000/](http://localhost:4000)
77+
78+
**Note** The default Jekyll configuration file only builds the JavaScript posts by [excluding folders](https://jekyllrb.com/docs/configuration/options/). 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.
79+
80+
- If you name the Jekyll configuration file `_config_personal.yml`, it will be caught by the `.gitignore` file and not committed to version control.
81+
- Run `bundle exec jekyll serve --config _config_personal.yml` to use the custom configuration file
82+
83+
- Example configuration:
84+
```yml
85+
# ---
86+
# Excludes every directory except JavaScript
87+
# ---
88+
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']
89+
```
90+
91+
and you'll only load the files in `_posts/plotly_js` directory because that is the only directory that is not excluded.
92+
93+
Change it to this:
94+
95+
```yml
96+
# ---
97+
# Excludes no directory
98+
# ---
99+
staticurl: http://localhost:4000/all_static
100+
exclude: []
101+
```
102+
103+
and you'll load every file because no directories are excluded.
104+
105+
## Continuous Integration
106+
107+
Whenever a pull request is made, a continuous integration workflow is initiated. This includes of:
108+
- running the `check-or-enforce-order.py` and `front-matter-ci.py` scripts inside of a Docker container to validate YAML front-matter
109+
- Percy screenshot testing
110+
111+
Making sure that a pull request passes every continuous integration test is a part of the code review process.
112+
113+
**For more information about the build process, inspect the CircleCI configuration file in this repository at https://github.com/plotly/documentation/blob/source-design-merge/.circleci/config.yml.**
114+
115+
## Other Documentation
116+
117+
This repository also contains:
118+
- Plotly's Node.js, Matlab, Scala, Julia, and Python V3 graphing libraries documentation
119+
- the reference pages for Plotly's JavaScript, Python, R, and Matlab graphing libraries.

Gemfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
source 'https://rubygems.org'
2+
gem 'github-pages'
3+
gem 'jekyll-redirect-from'
4+
gem 'jemoji'
5+
gem 'octopress'
6+
gem 'rake'
7+
gem 'jekyll-sitemap'
8+
gem 'percy-cli'
9+
10+
group :jekyll_plugins do
11+
gem 'octopress-debugger'
12+
end
13+
14+
group :jekyll_plugins do
15+
gem 'algoliasearch-jekyll', '~> 0.8.2'
16+
end

0 commit comments

Comments
 (0)