Skip to content

Commit 846bdf2

Browse files
committed
add header anchors
1 parent 56e36f2 commit 846bdf2

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

pelicanconf.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,15 @@
4848
}
4949

5050
PLUGINS = ['webassets']
51+
52+
MARKDOWN = {
53+
'extension_configs': {
54+
'markdown.extensions.codehilite': {'css_class': 'highlight'},
55+
'markdown.extensions.extra': {},
56+
'markdown.extensions.meta': {},
57+
'markdown.extensions.toc': {
58+
'permalink': True,
59+
},
60+
},
61+
'output_format': 'html5',
62+
}

themes/newsletter/templates/base.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@
122122
font-size: 16px;
123123
}
124124

125+
a.headerlink {
126+
display: none !important;
127+
}
128+
125129
a, a:visited {
126130
color: #2a7ae2;
127131
text-decoration: none;

themes/rusted/static/css/_base.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,23 @@ h1, h2, h3, h4, h5, h6 {
8383
}
8484

8585

86+
/**
87+
* Permalinks
88+
*/
89+
a.headerlink {
90+
color: $text-color;
91+
opacity: .3;
92+
padding: 0 5px 0 5px;
93+
94+
&:visited {
95+
color: $text-color;
96+
}
97+
98+
&:hover {
99+
opacity: 1;
100+
}
101+
}
102+
86103

87104
/**
88105
* Links

0 commit comments

Comments
 (0)