KSimple
Ksimple 是在 hugo-xmin 和 hugo-admonitions 基础上稍作修改的一个 hugo 主题。比较简单,可能更适合个人使用,因此没有单独发布的打算。
基本语法展示
Bold, Italic, Highlight, Delete,⛺,😘, Inline Code
, \(x^2 + y^2 = 1\),
$${\sqrt {n}}\left(\left({\frac {1}{n}}\sum _{i=1}^{n}X_{i}\right)-\mu \right)\ {\xrightarrow {d}}\ N\left(0,\sigma ^{2}\right)$$this is a blockquote
#include<iostream>
using namespace std;
int main(){
cout<<"hello hugo\n";
return 0;
}
- hallo
+ hello
- list
- item
- todo
- todo
图片排版
借用超链接实现浮动
[<<img src="xxx" alt="" style="max-width: 50%; float:right;">>]()
效果看上面那个 github 头像即可
div flex
<div style="display: flex; gap: 2px; justify-content: center">
<img src="aaa" alt="" style="max-width: 50%;">
<img src="bbb" alt="" style="max-width: 50%;">
</div>


TODO: 定制 Shotcode
PlantUML 代码块自动渲染
类图
@startuml
interface Scriptable{
toSmtLib():String
}
class SmtScript{
-functions:List<Function>
-addFunction(Function):void
}
abstract class Expr{
-node:ASTRootNode
-children:List<Expr>
}
enum ConstExpr
class CompoundExpr{
+getOp():String
}
struct ComplexExpr{
-format:String
}
class Function{
- funcName:string
- args:List<Pair<String,String>>
- returnType:String
- funcBody:Expr
}
Scriptable <|.. SmtScript
Scriptable <|.. Function
Scriptable <|.. Expr
Expr <|-- ConstExpr
Expr <|-- CompoundExpr
Expr <|-- ComplexExpr
Expr <-- Function
SmtScript "1"-->"1..*" Function
@enduml
活动图
@startuml
actor 用户 as user
participant PtolemyII as ptii
participant 验证选项配置器 as config
participant 模型解与预校验器 as parser
participant 形式化验证器 as verifier
user -> ptii++: 打开PtolemyII建模工具
ptii->ptii: 打开/创建模型
return 模型持久化XML文件
user -> config++: 配置验证选项,启动验证过程
config -> parser--++: 解析与校验模型
alt 校验失败
parser --> user: 返回校验错误信息
else 校验通过
parser -> verifier--++: 启动形式化验证
verifier -->user--: 返回验证结果
end
@enduml
ebnf
@startebnf
Type = PrimitiveType | ReferenceType;
PrimitiveType = [Annotation], (NumericType | boolean );
@endebnf
……
目录
暂时不打算给博客添加目录
可以考虑使用浏览器插件OneToc,有快捷键 Toggle 的功能,效果已经非常不错了。
以下 callout 块相关的内容(包括本博客的实现)全部来自具有MIT
开源协议的hugo-admonitions主题,详情请参考原主题!
Callout 块展示
Helpful advice for doing things better or more easily.
GitHub Test
Useful information that users should know, even when skimming content.
Helpful advice for doing things better or more easily.
Key information users need to know to achieve their goal.
Urgent info that needs immediate user attention to avoid problems.
Advises about risks or negative outcomes of certain actions.
Callout Overview
Abstract: This paper discusses the advantages and challenges of microservice architecture.
Advises about risks or negative outcomes of certain actions.
Code snippet:
function fetchData() {
return axios.get("/api/data");
}
Conclusion: Based on the analysis above, we’ve decided to implement Docker containerization.
Danger! Critical security vulnerability detected in the system. Immediate action required.
Error: Unable to connect to database. Please check your connection settings.
Example:
def hello_world():
print("Hello, World!")
Experiment: Testing the impact of new caching strategies on system performance.
Goal: Reduce service response time by 30% by the end of this quarter.
Idea: Implement a machine learning-based code quality detection system.
Key information users need to know to achieve their goal.
System status: All services are operating normally. Current uptime: 99.99%.
Memo: Technical review meeting scheduled for next Tuesday at 2:00 PM.
Useful information that users should know, even when skimming content.
System notification: Your password will expire in 30 days.
Question: How can we optimize database query performance?
“Code is like humor. When you have to explain it, it’s bad.” - Cory House
Congratulations! Your code has been successfully deployed to production.
To-do list:
- Update documentation
- Deploy new version
Helpful advice for doing things better or more easily.
Urgent info that needs immediate user attention to avoid problems.
Customization
Choose a callout you prefer and add a title
This is a summary using the TIP
callout!
This is a summary using the IDEA
callout!
Header Only Mode
You can choose to only to show the header!
npm install
to install all dependencies
Ctrl + C
to quickly terminate a running program