fix markdown 'code block'

This commit is contained in:
2025-07-27 18:23:12 +08:00
parent 807690044c
commit 6dd9da4da0
2 changed files with 25 additions and 1 deletions

2
.gitignore vendored
View File

@@ -166,7 +166,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear # and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ .idea/
# Ruff stuff: # Ruff stuff:
.ruff_cache/ .ruff_cache/

View File

@@ -24,6 +24,30 @@
display: block; display: block;
margin: 10px 0; margin: 10px 0;
} }
.post-content pre {
background-color: #f4f4f4;
border: 1px solid #ddd;
border-radius: 4px;
padding: 10px;
overflow-x: auto;
margin: 10px 0;
}
.post-content code {
font-family: 'Courier New', Courier, monospace;
background-color: #f4f4f4;
padding: 2px 4px;
border-radius: 3px;
font-size: 0.9em;
}
.post-content pre code {
background-color: transparent;
padding: 0;
border-radius: 0;
font-size: 0.9em;
}
</style> </style>
<div class="post-content">{{ post.get_markdown_content }}</div> <div class="post-content">{{ post.get_markdown_content }}</div>
</div> </div>