Skip to content

测试显示效果

Vanilla Markdown Syntax

二级标题会出现在右侧标题导航中

content, just for test

试试中文

文字 normal

加粗文字 bold

斜体文字 italic

加粗斜体 bold italic

中文字体似乎没有对应的粗斜体版本...

超链接:https://blog.locietta.xyz/

超链接文字:原地 TP

图片(SMMS 图床):

跑了张AI图测试图床XD

跑了张 AI 图用来测试,欸嘿

测试:没有标题的图,透明背景PNG

三级标题

四级标题

最多支持 4 级标题

引用

嵌套引用

引用

    • III
  • IV
  • five
  1. aaaa
  2. ssss
    1. dddd

缩进列表不会改变编号/圆点样式

代码块

行间代码git init

代码块

ts
import { defineConfig } from 'vitepress'

export default defineConfig({
  title: 'Hello VitePress',
  description: 'Just playing around.'
})
cpp
template <typename T, typename U = std::decay_t<decltype(*std::declval<const T &>().begin())>,
          typename std::enable_if_t<!std::is_trivially_copyable<U>::value && !std::is_trivially_copyable<T>::value, int> = 0>
void serialize(std::ostream &os, const T &val) {
    unsigned int size = val.size();
    os.write(reinterpret_cast<const char *>(&size), sizeof(size));
    for (auto &v : val) {
        serialize(os, v);
    }
}

数学公式(KaTeX)

行间公式行间公式行间公式行间公式行间公式行间公式行间公式行间公式行间公式行间公式行间公式 行间公式行间公式行间公式行间公式行间公式行间公式行间公式行间公式行间公式行间公式行间公式行间公式

Extended Markdown Syntax

Github 扩展

GitHub Style 表情符号: 💯 🎉 🍵 ☕ 😄

Github Style 表格:

TablesAreCool
col 3 isright-aligned$1600
col 2 iscentered
zebra stripesare neatconstexpr int abs(int x);

特殊容器块

INFO

This is an info block.

提示

This is a tip.

WARNING

This is a warning.

标题可以随便取

DANGER!!!

test code & formula in blocks:

cat hello.txt | rg world

lua
-- function is first-class member!
local _gcd = function (a, b)
  if b == 0 then
    return a
  end
  return _gcd(b, a % b)
end
-- the function who kill the bilibili server once XD
-- that's why we'd like a typed version of lua

Stroke's:

Details

verbose content, collapsed on default

代码块扩展

cpp
template <typename T>
class Singleton {
public:
    static T &getInstance() {
        static T instance{_{}}; // Focused here!
        return instance;
    }

    Singleton(const Singleton &) = delete;
    Singleton &operator=(const Singleton) = delete;

protected:
    struct _ {};
    Singleton() = default;
};
cpp
template <typename T>
class Singleton {
public:
    static T &getInstance() {
        static T instance{_{}};
        return instance;
    }

    Singleton(const Singleton &) = delete;
    Singleton &operator=(const Singleton) = delete;

protected:
    struct _ {};
    Singleton() {}
    Singleton() = default;
};