Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 682d40e

Browse files
michaelbabynjdamiba
and
jdamiba
authored
programmatically generate URLs
Co-Authored-By: jdamiba <[email protected]>
1 parent d2b6581 commit 682d40e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

_includes/breadcrumb.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,17 @@
6262
-->
6363
<div class="--fork">
6464
{% if page.permalink == '/ipython-notebooks/' %}
65-
<a id="forklink" href="https://github.com/plotly/IPython-plotly">
65+
{% assign filename = page.path | split, "/" | last %}
66+
<div class="--fork">
67+
<a id="forklink" href= "{{ page.path | remove: filename | prepend: "https://github.com/plotly/documentation/tree/source-design-merge/" }}" >
68+
<div class="icon">
69+
<svg style="width:24px;height:24px" viewbox="0 0 24 24">
70+
<path fill="#000000" d="M2.6,10.59L8.38,4.8L10.07,6.5C9.83,7.35 10.22,8.28 11,8.73V14.27C10.4,14.61 10,15.26 10,16A2,2 0 0,0 12,18A2,2 0 0,0 14,16C14,15.26 13.6,14.61 13,14.27V9.41L15.07,11.5C15,11.65 15,11.82 15,12A2,2 0 0,0 17,14A2,2 0 0,0 19,12A2,2 0 0,0 17,10C16.82,10 16.65,10 16.5,10.07L13.93,7.5C14.19,6.57 13.71,5.55 12.78,5.16C12.35,5 11.9,4.96 11.5,5.07L9.8,3.38L10.59,2.6C11.37,1.81 12.63,1.81 13.41,2.6L21.4,10.59C22.19,11.37 22.19,12.63 21.4,13.41L13.41,21.4C12.63,22.19 11.37,22.19 10.59,21.4L2.6,13.41C1.81,12.63 1.81,11.37 2.6,10.59Z"></path>
71+
</svg>
72+
</div>
73+
<span>Fork on Github</span>
74+
</a>
75+
</div>
6676
<div class="icon">
6777
<svg style="width:24px;height:24px" viewbox="0 0 24 24">
6878
<path fill="#000000" d="M2.6,10.59L8.38,4.8L10.07,6.5C9.83,7.35 10.22,8.28 11,8.73V14.27C10.4,14.61 10,15.26 10,16A2,2 0 0,0 12,18A2,2 0 0,0 14,16C14,15.26 13.6,14.61 13,14.27V9.41L15.07,11.5C15,11.65 15,11.82 15,12A2,2 0 0,0 17,14A2,2 0 0,0 19,12A2,2 0 0,0 17,10C16.82,10 16.65,10 16.5,10.07L13.93,7.5C14.19,6.57 13.71,5.55 12.78,5.16C12.35,5 11.9,4.96 11.5,5.07L9.8,3.38L10.59,2.6C11.37,1.81 12.63,1.81 13.41,2.6L21.4,10.59C22.19,11.37 22.19,12.63 21.4,13.41L13.41,21.4C12.63,22.19 11.37,22.19 10.59,21.4L2.6,13.41C1.81,12.63 1.81,11.37 2.6,10.59Z"></path>

0 commit comments

Comments
 (0)