ext/web W4c: SEO meta, Markdown render, RSS, pagination UI
Add lib/net markdown_parse, page.meta/paginate and app.route_rss author APIs, GFM Markdown article bodies, head SEO tags, list pagination nav, and RSS 2.0 feed routes — keeping tables + class methods as the author surface. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
be6223f1fb
commit
e7c9c21a49
18 files changed
+671
-60
No files matched your search
@@ -0,0 +1,16 @@
|
||||
//! Markdown → HTML for article bodies (GFM subset via pulldown-cmark).
|
||||
|
||||
use pulldown_cmark::{html, Options, Parser};
|
||||
|
||||
pub fn to_html(md: &str) -> String {
|
||||
let mut opts = Options::empty();
|
||||
opts.insert(
|
||||
Options::ENABLE_STRIKETHROUGH
|
||||
| Options::ENABLE_TABLES
|
||||
| Options::ENABLE_TASKLISTS,
|
||||
);
|
||||
let parser = Parser::new_ext(md, opts);
|
||||
let mut html_out = String::new();
|
||||
html::push_html(&mut html_out, parser);
|
||||
format!("<div class=\"article-body md\">{html_out}</div>")
|
||||
}
|
||||
Reference in new issue
Block a user