Skip to content

Commit 493640c

Browse files
finally update R search
1 parent 642ec5e commit 493640c

File tree

5 files changed

+36
-30
lines changed

5 files changed

+36
-30
lines changed

Rakefile

+3-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ desc "Serve as if deploying"
1414
task :serve => [] do
1515

1616
puts "...getting latest python docs"
17-
system "rm -rf _posts/python/html" or exit!(1)
18-
system "rm -rf _posts/r/md" or exit!(1)
19-
system "rm -rf _posts/ggplot2/md/ggplot2" or exit!(1)
20-
system "git clone -b built git@github.com:plotly/plotly.py-docs _posts/python/html" or exit!(1)
21-
system "git clone -b built git@github.com:plotly/plotly.r-docs _posts/r/md" or exit!(1)
17+
system "rm -rf _posts/python/html _posts/r/md _posts/ggplot2/md" or exit!(1)
18+
system "git clone --depth 1 -b built git@github.com:plotly/plotly.py-docs _posts/python/html" or exit!(1)
19+
system "git clone --depth 1 -b built git@github.com:plotly/plotly.r-docs _posts/r/md" or exit!(1)
2220
system "mv _posts/r/md/ggplot2 _posts/ggplot2/md" or exit!(1)
2321
system "jekyll serve"
2422
end

_config_python_search.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ exclude: [
1313
#'_posts/python/',
1414
'_posts/plotly_js/',
1515
'_posts/python-v3/', '_posts/dashboards/', '_posts/misc/',
16-
'_posts/ggplot2','_posts/julia','_posts/scala',
16+
'_posts/ggplot2',
17+
'_posts/julia','_posts/scala',
1718
'_posts/matlab',
1819
'_posts/nodejs',
1920
'_posts/temp',
2021
'vendor', 'node_modules',
21-
'plotly.py'
22+
'plotly.py', 'plotly.r-docs'
2223
]
2324

2425
# ---
@@ -38,6 +39,7 @@ algolia:
3839
- '*.Rmd'
3940
- '*.R'
4041
- 'plotly.py'
42+
- 'plotly.r-docs'
4143
- '_posts/dashboards'
4244
- '_posts/ggplot2'
4345
- '_posts/julia'

_config_r_search.yml

+20-23
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,24 @@ plugins:
33
- jekyll-sitemap
44
- algoliasearch-jekyll
55

6-
# ---
7-
# Assets
8-
# ---
9-
imgurl: https://images.plot.ly/plotly-documentation/
10-
#stylesheet: https://s3-us-west-1.amazonaws.com/plotly-tutorials/assets/css/api/main.css
11-
plotlyjs_download_url: https://cdn.plot.ly/plotly-latest.min.js
12-
13-
146
# ---
157
# Excludes
168
# ---
17-
#exclude: ['*.Rmd','_posts/2015-09-09-matlab-reference.html','_posts/2015-09-06-r-reference.html','_posts/2015-09-06-python-reference.html','_posts/2015-08-19-plotly_js-reference.html','_posts/2015-04-05-ggplot2-index.html','_posts/2015-04-05-julia-index.html','_posts/2015-04-05-node_js-index.html','_posts/2015-04-05-plotly_js-index.html','_posts/2015-04-05-plotlyjs-function-reference.md','_posts/2015-07-13-eula_index.html','_posts/2015-07-26-index.html','_posts/2015-07-30-r-index.Rmd','_posts/2015-07-30-r-index.md','_posts/2015-08-20-research-box-index.html','_posts/ggplot2','_posts/julia','_posts/nodejs','_posts/plotly_js','_posts/r','_posts/tutorials','_posts/user_guide_python']
18-
exclude: [_posts/temp, '*.Rmd', _posts/user_guide_python/old_user_guide/redirect_from]
19-
20-
# ---
21-
# Markdown / Syntax
22-
# ---
23-
kramdown:
24-
input: GFM
25-
markdown: redcarpet
26-
redcarpet:
27-
extensions: ["tables", "fenced_code_blocks"]
9+
exclude: [
10+
'*.Rmd',
11+
'_posts/reference_pages/',
12+
#'_posts/r/',
13+
'_posts/python/',
14+
'_posts/plotly_js/',
15+
'_posts/python-v3/', '_posts/dashboards/', '_posts/misc/',
16+
#'_posts/ggplot2',
17+
'_posts/julia','_posts/scala',
18+
'_posts/matlab',
19+
'_posts/nodejs',
20+
'_posts/temp',
21+
'vendor', 'node_modules',
22+
'plotly.py', 'plotly.r-docs'
23+
]
2824

2925
# ---
3026
# Algolia Search
@@ -40,17 +36,18 @@ algolia:
4036
excluded_files:
4137
- '*.ipynb'
4238
- '*.png'
43-
- '*.Rmd'
44-
- '*.R'
39+
- 'plotly.py'
40+
- 'plotly.r-docs'
4541
- '_posts/dashboards'
4642
- '_posts/julia'
4743
- '_posts/matlab'
4844
- '_posts/misc'
4945
- '_posts/nodejs'
5046
- '_posts/plotly_js'
5147
- '_posts/python'
52-
- '_posts/r/jupyter'
53-
- '_posts/r/misc'
48+
- '_posts/r/streaming'
49+
- '_posts/r/chart-studio'
50+
- '_posts/r/chart-events'
5451
- '_posts/reference_pages'
5552
- '_posts/scala'
5653
- '_posts/temp'

makefile

+6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ update_python_search :
2020

2121
update_r_search :
2222
@echo "Updating r_docs index"
23+
rm -rf plotly.r-docs _posts/r/md _posts/ggplot2/md
24+
git clone git@github.com:plotly/plotly.r-docs --branch=master --depth=1
25+
bash process_r_md.sh
26+
cp -R plotly.r-docs/r/ _posts/r/md
27+
cp -R plotly.r-docs/ggplot2/ _posts/ggplot2/md
2328
bundle exec jekyll algolia push --config _config_r_search.yml
29+
rm -rf plotly.r-docs _posts/r/md _posts/ggplot2/md
2430

2531
update_ref_search :
2632
@echo "Updating search for reference pages"

process_r_md.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
for file in plotly.r-docs/**/*.Rmd; do mv $file ${file/.Rmd/.md}; done;

0 commit comments

Comments
 (0)