mirror of
https://github.com/muerwre/muerwre.github.io.git
synced 2025-04-25 02:46:39 +07:00
initial
This commit is contained in:
commit
5104c2518b
34 changed files with 6844 additions and 0 deletions
10
server/plugins/highlight.ts
Normal file
10
server/plugins/highlight.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
export default defineNitroPlugin((nitroApp) => {
|
||||
nitroApp.hooks.hook("content:file:beforeParse", (file) => {
|
||||
if (file._id.endsWith(".md")) {
|
||||
file.body = file.body.replace(
|
||||
/==([^=]+)==/gs,
|
||||
`<span class="highlight">$1</span>`
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue