In the previous article, we added syntax highlighting for our Markdown code blocks.

But you might have noticed that the document page title ({{ page_title }}) is still hardcoded in the main.py route function ("page_title": "Hello, Markdown!"). This is very inflexible. Does this mean we have to modify the code every time we add a new document?

A documentation site needs to be flexible, allowing for articles to be added or removed at any time. The article’s metadata—like its title, author, and date—should be defined within the Markdown file itself, just like the content.

In this article, we will introduce Frontmatter (a common specification for defining metadata at the top of a…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help