Ananke Documentation
  • Overview
  • Tutorials
    • Build your first Ananke site
  • How-to guides
    • Install as a Hugo Module
    • Install as a Git submodule
    • Update Ananke
    • Set up menus
    • Add social links
    • Add custom CSS
    • Configure page headers
    • Use hooks
    • Troubleshooting
  • Explanation
    • Choose an installation method
    • How configuration works
    • How the stylesheet is built
    • Content types and archetypes
    • Hooks and filters
  • Reference
    • Configuration reference
    • Front matter
    • Hugo version compatibility
    • Shortcodes
    • Hook catalogue
    • Layout map
  • Help
    • Contributing to the documentation
    • Developing across the Ananke repositories
    • Contributors
Mastodon
Examples and recipes

External links

css
a.ananke-social-link[target="_blank"]::after {
  content: "↗" / "Open in new window";
  display: inline-block;
  margin-inline-start: 0.25em;
  font-size: 0.85em;
  line-height: 1;
  vertical-align: 0.1em;
}
css
.new-window {
  opacity: 0;
  display: inline-block;
  vertical-align: top;
}
.link-transition:hover .new-window{
  opacity: 1;
}
css
@supports (content: "x" / "y") {
  .new-item::before {
    content: "★" / "Highlighted Text:";
  }
}

@supports not (content: "x" / "y") {
  .new-item::before {
    content: "★";
    alt: "Highlighted Text:";
  }
}

Revealing URLs in print styles sheets #

css
@media print {
  a[href^="http://"]:after,
  a[href^="https://"]:after
  {
    content: ' (' attr(href) ')';
  }
}

custom counters #

css
ol {
  list-style-type: none;
  counter-reset: mylist;
}

li {
  counter-increment: mylist;
}

li::before {
  content: '🤤 ' counter(mylist) ': ';
}
Back to contents
Improve this page on GitHub
      On this page

      On this page

      • Revealing URLs in print styles sheets
      • custom counters
      Ananke Documentation © Ananke Documentation 2026
      Mastodon