Skip to content

Commit 3e5469e

Browse files
jnothmanqinhanmin2014
authored andcommitted
DOC Add permalink icons to glossary terms (scikit-learn#10429)
1 parent 4a9034a commit 3e5469e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ def make_carousel_thumbs(app, exception):
282282
def setup(app):
283283
# to hide/show the prompt in code examples:
284284
app.add_javascript('js/copybutton.js')
285+
app.add_javascript('js/extra.js')
285286
app.connect('build-finished', make_carousel_thumbs)
286287

287288

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Miscellaneous enhancements to doc display
2+
3+
4+
$(document).ready(function() {
5+
/*** Add permalink buttons next to glossary terms ***/
6+
7+
$('dl.glossary > dt[id]').append(function() {
8+
return ('<a class="headerlink" href="#' +
9+
this.getAttribute('id') +
10+
'" title="Permalink to this term">¶</a>');
11+
})
12+
});

0 commit comments

Comments
 (0)