Add links to titles

pull/2/head
Gabriel Augendre 8 months ago
parent cd284d43cc
commit 8b32e2e9a4
  1. 5
      src/articles/static/public.css
  2. 2
      src/articles/utils.py

@ -40,3 +40,8 @@ a.tag:not(:first-of-type):before {
font-size: 1.2rem;
padding: 8px 16px;
}
.toclink {
color: var(--nc-tx-1);
text-decoration: none;
}

@ -4,6 +4,7 @@ import markdown
from bs4 import BeautifulSoup
from django.conf import settings
from markdown.extensions.codehilite import CodeHiliteExtension
from markdown.extensions.toc import TocExtension
from articles.markdown import LazyLoadingImageExtension
@ -20,6 +21,7 @@ def format_article_content(content):
extensions=[
"extra",
"admonition",
TocExtension(anchorlink=True),
CodeHiliteExtension(linenums=False, guess_lang=False),
LazyLoadingImageExtension(),
]

Loading…
Cancel
Save