This is a test blog post.
Inline expressions such as are supported, as well as centered expressions. Here is the diffusion equation:
Code Blocks
Here is an example C++ code block:
// Write out a std::tuple to std::ostream
template<typename Ch, typename Tr, typename... Ts>
auto& operator<<(std::basic_ostream<Ch, Tr> &stream,
std::tuple<Ts...> const &tup) {
std::basic_stringstream<Ch, Tr> tmp;
tmp << "(";
std::apply(
[&tmp] (auto&&... args) { ((tmp << args << ", "), ...); },
tup
);
tmp.seekp(-2, tmp.cur);
tmp << ")";
return stream << tmp.str();
}
Here is an example Scala code block:
// Materialize an Ordering[U] from an Ordering[T] and a map from T to U
extension [A](ordT: Ordering.type) {
def map[B](conv: A => B)(using ord: Ordering[B]): Ordering[A] = {
new Ordering[A] {
def compare(x: A, y: A): Int = {
ord.compare(conv(x), conv(y))
}
}
}
}
Embedding Images
Images placed into /public
directory can be referenced and embedded into MDX:
Embedding JavaScript
JSX and TSX components can be embedded into MDX. Here is an example YouTube video:
And here is an example Bilibili video: