diff options
| -rw-r--r-- | blog/render.py | 5 | ||||
| -rw-r--r-- | posts/libstdc++-std-unordered-map/libstdc++-unordered-map.md | 4 | ||||
| -rw-r--r-- | share/style.css | 8 | 
3 files changed, 16 insertions, 1 deletions
| diff --git a/blog/render.py b/blog/render.py index cdd018f..ad06602 100644 --- a/blog/render.py +++ b/blog/render.py @@ -1,5 +1,7 @@  import markdown +from markdown.extensions.toc import TocExtension +  def read_file_content(filename: str) -> str:      with open(filename) as f: @@ -13,4 +15,5 @@ def write_file_content(filename: str, data: str) -> None:  def to_html(filename: str) -> str:      text = read_file_content(filename) -    return markdown.markdown(text, extensions=["fenced_code", "footnotes"]) +    return markdown.markdown(text, extensions=["fenced_code", "footnotes", +                                               TocExtension(anchorlink=True)]) diff --git a/posts/libstdc++-std-unordered-map/libstdc++-unordered-map.md b/posts/libstdc++-std-unordered-map/libstdc++-unordered-map.md index a1ddad2..bb39544 100644 --- a/posts/libstdc++-std-unordered-map/libstdc++-unordered-map.md +++ b/posts/libstdc++-std-unordered-map/libstdc++-unordered-map.md @@ -1,3 +1,7 @@ +[TOC] + +## Introduction +  We all love maps. We love hash maps even more. They should be fast and  help to solve a large number of problems. Do you ever wonder about how they are  working under the hood? In this post I am going to explore implementation diff --git a/share/style.css b/share/style.css index 3d41f16..59001fd 100644 --- a/share/style.css +++ b/share/style.css @@ -115,3 +115,11 @@ ul.posts time {  ul.posts li a:visited {      color: #8b6fcb;  } + +.toclink { +    color: #222; +} + +.toclink:hover { +    text-decoration: none; +} |