Add links to titles

This commit is contained in:
Gabriel Augendre 2021-12-28 12:40:42 +01:00
parent cd284d43cc
commit 8b32e2e9a4
2 changed files with 7 additions and 0 deletions

View file

@ -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;
}

View file

@ -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(),
]