Skip to content

Commit

Permalink
Adds support for footnotes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhariri committed Oct 22, 2024
1 parent 814e95f commit 90b08b1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion service/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ class Post(BaseModel):

@property
def html_content(self) -> str:
return markdown.markdown(self.content, extensions=["fenced_code", "codehilite"])
return markdown.markdown(
self.content,
extensions=["fenced_code", "codehilite", "footnotes"]
)

@property
def pretty_date(self) -> str:
Expand Down
14 changes: 14 additions & 0 deletions static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,20 @@ ul.post-tags .tag:first-child {
margin: 0 0 0.5rem 0;
}

.footnote {
color: var(--description-color);
font-size: 0.8rem;
}

.footnote ol {
margin-left: 0rem;
padding-left: 1.25rem;
}

.footnote a {
color: var(--description-color);
}

.codehilite .c { color: var(--code-comment); font-style: italic } /* Comment */
.codehilite .k { color: var(--code-keyword); font-weight: bold } /* Keyword */
.codehilite .o { color: var(--code-primitive) } /* Operator */
Expand Down

0 comments on commit 90b08b1

Please sign in to comment.