Added permalinks
This commit is contained in:
parent
e2d208ac0a
commit
e267b9ddde
|
|
@ -1,6 +1,7 @@
|
|||
from pathlib import Path
|
||||
import markdown
|
||||
from markdown.extensions.wikilinks import WikiLinkExtension
|
||||
from markdown.extensions.toc import TocExtension
|
||||
|
||||
SOURCE_DIR = Path("docs") # input folder
|
||||
OUTPUT_DIR = Path("www") # output folder
|
||||
|
|
@ -13,6 +14,7 @@ def convert_markdown_to_html(md_path: Path, html_path: Path):
|
|||
html_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
md = markdown.Markdown(extensions=[
|
||||
WikiLinkExtension(base_url='./', end_url='.html', build_url=my_url_builder),
|
||||
TocExtension(permalink=True),
|
||||
'tables',
|
||||
'fenced_code',
|
||||
'sane_lists',
|
||||
|
|
|
|||
|
|
@ -30,6 +30,14 @@ a {
|
|||
color: #375899;
|
||||
}
|
||||
|
||||
a.headerlink {
|
||||
color: #dddddd;
|
||||
}
|
||||
|
||||
a.headerlink:hover {
|
||||
color: #375899;
|
||||
}
|
||||
|
||||
/* p {
|
||||
font-size: 18px;
|
||||
margin-top: 16px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue