diff options
author | Vincent Ambo <mail@tazj.in> | 2023-05-26T14·27+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2023-05-27T11·40+0000 |
commit | d419b81ef7bd3bfc3a6911a13a303278eaa1be98 (patch) | |
tree | e10930f9e01bbff5e0bd8fa1c385644bccedbb4e /corp/rih/src/main.rs | |
parent | 99c78966372017cb3b7bf021f08520a040004b0c (diff) |
feat(corp/rih): add macro to render Markdown->yew::Html statically r/6209
This makes it possible to embed long texts from Markdown files instead of dealing with writing the weird HTML-tags inside the yew macros, which will be much easier for content editors to deal with. Change-Id: Idc4e67404fcfe2b8d5083cf556df1c701ba17660 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8648 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'corp/rih/src/main.rs')
-rw-r--r-- | corp/rih/src/main.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/corp/rih/src/main.rs b/corp/rih/src/main.rs index e2f3480c37a8..5cad294a8e02 100644 --- a/corp/rih/src/main.rs +++ b/corp/rih/src/main.rs @@ -5,6 +5,7 @@ use gloo::storage::{LocalStorage, Storage}; use rand::seq::IteratorRandom; use rand::thread_rng; use serde::{Deserialize, Serialize}; +use static_markdown::markdown; use std::collections::BTreeSet; use wasm_bindgen::closure::Closure; use wasm_bindgen::JsCast; |