This release adds "hover anchors" and fixes two bugs with filters and frontmatter.
Bug Fixes
- Fixed a problem with the `export` values of filters not being loaded when those filters were enabled via frontmatter on some pages.
- Fixed a problem where filters would not get imported if they were only listed in frontmatter sections and not in the main config file somewhere.
Hover Anchors
Added the option to enable "hover anchors" for linking directly to headers. These are little links that appear next to a header so that you can right-click and copy the link to get a URL directly to that header. To enable hover anchors, you need to make two changes:
1. In your Dactyl config file, add a `hover_anchors` field to the definition of the target(s) or page(s) you want to enable them on. Set the value to whatever text or HTML you want to represent the anchor. Some examples:
Plain text octothorpe:
- name: some_target
hover_anchors: ""
FontAwesome 4 link icon:
- name: some_target
hover_anchors: <i class="fa fa-link"></i>
2. In your stylesheet, add styles to show `.hover_anchor` elements only when headers are hovered. For example:
CSS:
.hover_anchor {
visibility: hidden;
padding-left: 1rem;
font-size: 60%;
text-decoration: none;
}
h1:hover .hover_anchor, h2:hover .hover_anchor,
h3:hover .hover_anchor, h4:hover .hover_anchor,
h5:hover .hover_anchor, h6:hover .hover_anchor {
visibility: visible;
}
Or, SCSS, if you prefer:
.dactyl_content {
// Hover anchors ---------------
.hover_anchor {
visibility: hidden;
padding-left: 1rem;
font-size: 60%;
}
h1,h2,h3,h4,h5,h6 {
&:hover .hover_anchor {
visibility: visible;
text-decoration: none;
}
}
}