|
71 | 71 | -->
|
72 | 72 |
|
73 | 73 | <div class="--fork">
|
74 |
| - {% if page.language == "python" and page.layout != "langindex" %} |
75 |
| - {% assign offset = page.permalink | size | minus: 1 %} |
76 |
| - {% assign filename = page.permalink | slice: 0, offset %} |
| 74 | + {% if page.path contains "/python/html/" %} |
| 75 | + {% assign filename = page.path | replace: "_posts/python/html/2019-07-03-", "" | replace: ".html", ".md" %} |
77 | 76 |
|
78 |
| - <a href= "{{ filename | prepend: "https://mybinder.org/v2/gh/plotly/plotly.py/doc-prod?filepath=doc%2F" | append: ".md" }}" |
79 |
| - target="_blank" style="float: right; margin-left: 20px;"> |
80 |
| - <img src="/all_static/images/binder_badge.svg" /> |
81 |
| - </a> |
| 77 | + <a href= "{{ filename | prepend: "https://mybinder.org/v2/gh/plotly/plotly.py/doc-prod?filepath=doc%2Fpython%2F" }}" |
| 78 | + target="_blank" style="float: right; margin-left: 20px;"> |
| 79 | + <img src="/all_static/images/binder_badge.svg" /> |
| 80 | + </a> |
82 | 81 |
|
83 |
| - <a id="forklink" href= "{{ filename | prepend: "https://github.com/plotly/plotly.py/edit/doc-prod/doc/" | append: ".md" }}" > |
| 82 | + <a id="forklink" href= "{{ filename | prepend: "https://github.com/plotly/plotly.py/edit/doc-prod/doc/python/" }}" > |
| 83 | + {% elsif page.path contains "/r/md/" %} |
| 84 | + {% assign filename = page.path | replace: "_posts/r/md/", "" | replace: ".md", ".Rmd" %} |
| 85 | + <a id="forklink" href= "{{ filename | prepend: "https://github.com/plotly/plotly.r-docs/edit/master/r/" }}" > |
84 | 86 | {% else %}
|
85 |
| - {% assign filename = page.path | split, "/" | last %} |
86 |
| - <a id="forklink" href= "{{ page.path | remove: filename | prepend: "https://github.com/plotly/documentation/tree/source-design-merge/" }}" > |
| 87 | + {% assign filename = page.path | split, "/" | last %} |
| 88 | + <a id="forklink" href= "{{ page.path | remove: filename | prepend: "https://github.com/plotly/documentation/tree/source-design-merge/" }}" > |
87 | 89 | {% endif %}
|
88 | 90 | <div class="icon">
|
89 | 91 | <svg style="width:24px;height:24px" viewbox="0 0 24 24">
|
|
0 commit comments