Adds anchor rendering.

wch-ch32v003
Felix (xq) Queißner 4 years ago
parent bcb71bfb64
commit aff9a092bd

2
.gitmodules vendored

@ -1,3 +1,3 @@
[submodule "deps/koino"] [submodule "deps/koino"]
path = deps/koino path = deps/koino
url = https://github.com/kivikakk/koino url = https://github.com/MasterQ32/koino

2
deps/koino vendored

@ -1 +1 @@
Subproject commit bd71384edb665ee6cfecb573296c23ac6d15a033 Subproject commit 0be309f6c47582ecb8d8ca577c998b72226a1ecd

@ -9,12 +9,12 @@ const markdown_options = koino.Options{
}, },
.render = .{ .render = .{
.header_anchors = true, .header_anchors = true,
.anchor_icon = "§ ",
}, },
}; };
/// verifies and parses a file name in the format /// verifies and parses a file name in the format
/// "YYYY-MM-DD - " [.*] ".md" /// "YYYY-MM-DD - " [.*] ".md"
///
fn isValidArticleFileName(path: []const u8) ?Date { fn isValidArticleFileName(path: []const u8) ?Date {
if (path.len < 16) if (path.len < 16)
return null; return null;
@ -596,6 +596,19 @@ const Website = struct {
\\ padding-left: 0.5em; \\ padding-left: 0.5em;
\\ margin-left: 0.5em; \\ margin-left: 0.5em;
\\ } \\ }
\\
// Make links in headings invisible
\\ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
\\ text-decoration: none;
\\ font-weight: lighter;
\\ color: unset;
\\ opacity: 50%;
\\ visibility: hidden;
\\ margin-left: -1em;
\\ }
\\ h1:hover a, h2:hover a, h3:hover a, h4:hover a, h5:hover a, h6:hover a {
\\ visibility: visible;
\\ }
\\</style> \\</style>
\\</head> \\</head>
\\<body> \\<body>

Loading…
Cancel
Save