Code
Dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
More
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea x=1 commodo consequat.
function f(x)
println(1)
return x
end
find . -iname "*.tex" -o -iname "*.bib" | entr latexmk -pdf
We can put this data in a table (DataFrame):
using AlgebraOfGraphics
using CairoMakie
using DataFrames
using Statistics: mean
use crate::ToResponse;
use askama::Template;
// fn from(parts: (bool, &ServerContext, String, String)) -> Self {
// let (logged_in, ctx, title_txt, path) = parts;
// let conn = ctx.conn();
// let has_blogroll = fx_core::data::Kv::get(&conn, fx_core::data::BLOGROLL_SETTINGS_KEY)
// .map(|v| !v.is_empty())
// .unwrap_or(false);
// let mut admin_links = Vec::new();
// if logged_in {
// admin_links.push(fx_core::data::NavLink {
// href: "/files".into(),
// label: "📁 Files".into(),
// });
// admin_links.push(fx_core::data::NavLink {
// href: "/settings".into(),
// label: "⚙️ Settings".into(),
// });
// }
// Self {
// title: format!("Walt's Forge | {}", title_txt),
// author_name: "Walt's Forge".into(),
// about_html: fx_core::md::content_to_html(&fx_core::data::Kv::get_or_empty_string(
// &conn, "about",
// )),
// logged_in,
// has_blogroll,
// lang: ctx.core.args.html_lang.clone(),
// main_pages: fx_core::util::main_pages(ctx),
// admin_links,
// show_back_button: logged_in && path.contains("/edit"),
// border_style: "border-bottom: 2px solid var(--border);".into(),
// }
// }
#[derive(Template, Default)]
#[template(path = "error.html")]
pub struct ErrorTemplate {
pub error_title: String,
pub message: String,
}
impl From<(String, String)> for ErrorTemplate {
fn from((title, msg): (String, String)) -> Self {
Self {
error_title: title,
message: msg,
..Default::default()
}
}
}
impl ToResponse for ErrorTemplate {
fn to_response(&self) -> Result<String, String> {
self.render().map_err(|e| format!("Template Error: {}", e))
}
fn title(&self) -> String {
self.error_title.clone()
}
}
x = 1
| my | table |
|---|---|
| a | b |
| c | d |
And some more text to get over the preview length limit1.
Footnotes
-
A simple footnote. ↩