diff --git a/.hugo_build.lock b/.hugo_build.lock
new file mode 100644
index 0000000..e69de29
diff --git a/archetypes/default.md b/archetypes/default.md
new file mode 100644
index 0000000..00e77bd
--- /dev/null
+++ b/archetypes/default.md
@@ -0,0 +1,6 @@
+---
+title: "{{ replace .Name "-" " " | title }}"
+date: {{ .Date }}
+draft: true
+---
+
diff --git a/config.toml b/config.toml
new file mode 100644
index 0000000..3d0ccba
--- /dev/null
+++ b/config.toml
@@ -0,0 +1,66 @@
+DefaultContentLanguage = "cn"
+author = "K-C"
+baseURL = "https://example.com/"
+disqusShortname = "ck"
+hasCJKLanguage = true
+languageCode = "zh-cn"
+theme = "tokiwa"
+title = "悉达多"
+googleAnalytics = "G-CWBXLVG90W"
+
+canonifyurls = false
+paginate = 10
+pygmentsCodefences = true
+pygmentsCodefencesGuessSyntax = true
+pygmentsStyle = 'manni'
+
+[markup]
+ [markup.goldmark.extensions]
+ typographer = false
+ [markup.goldmark.renderer]
+ unsafe= true
+ [markup.highlight]
+ style = "monokailight"
+
+[params]
+bannerFont = "fonts/exampleFont"
+description = """
+Tokiwa-iro is the theme color of this site.
+"""
+env = "production" # for Google Analytics and DISQUS.
+favicon = "img/favicon-32x32.png"
+fuse = true # for searchbox. "JSON" must added to output contents. See [outputs].
+math = true # for introducing $KaTEX$
+useChineseFonts = true
+postDateFormat = "2006-1-2"
+
+[menu]
+# Shown in the side menu.
+[[menu.main]]
+identifier = "post"
+name = "Posts"
+url = "/post/"
+weight = 1
+[[menu.main]]
+name = "Tags"
+url = "/tags/"
+weight = 2
+
+[[menu.main]]
+identifier = "about"
+name = "About"
+url = "/about/"
+weight = 3
+
+[taxonomies]
+category = "categories"
+series = "series"
+tag = "tags"
+
+[social]
+github = "https://github.com/Chi-Kai"
+mail = "chikai0307@gmail.com"
+# any icon in layouts/partials/svg can be used by the name without the "-line.svg"
+
+[outputs]
+home = ["HTML", "RSS", "JSON"]
diff --git "a/content/post/DAG\345\214\272\345\235\227\351\223\276\347\273\274\350\277\260.md" "b/content/post/DAG\345\214\272\345\235\227\351\223\276\347\273\274\350\277\260.md"
new file mode 100644
index 0000000..e454399
--- /dev/null
+++ "b/content/post/DAG\345\214\272\345\235\227\351\223\276\347\273\274\350\277\260.md"
@@ -0,0 +1,210 @@
+---
+author : "KC"
+type : "post"
+tags :
+ - 区块链
+ - 论文阅读
+title: "DAG区块链综述"
+description: 时不时补充
+date: 2022-11-07
+draft: false
+toc: true
+---
+
+## 问题现状
+
+#### 区块链面临的问题
+
+区块链作为现在一个热门技术,越来越多的人涌入其中。传统的区块链由于其单链结构和共识算法的限制,存在[!!!]等问题。
+之前有研究工作提出,一个区块链中区块链的去中心化,安全,和规模三个特新不能共存。
+
+#### 解决方案
+- 分片技术: 将一个交易分片来并行处理,但是很难达成共识,跨链技术通过在不同分片之间建立通道来解决这个问题。
+- Layer2 Protocl:参与者能够通过私有通信而不是广播到整个网络来执行脱(主)链交易挑战是如何正确有效地保证链下和链上交易的有效性和一致性。
+- 辅助链技术: 通过增加辅助链来让更多的交易参与。
+- 混合结构
+- 混合共识算法
+- 修改硬解码参数
+
+这些方案都受限于区块链的线性结构,因此结构上的改变成为一个新兴方案。
+
+#### DAG区块链的提出
+
+单链结构使得同一时间多个节点竞争一个可用位置,这导致了认证缓慢,交易竞争和算力浪费。
+为了能在同一时间提交更多交易,提出了基于DAG的区块链。
+
+## 概览
+
+DAG 是指有向无环图,通常被当作一种基础数据结构应用于导航寻址,数据压缩等算法场景。
+这个概念首次被Sompolinksky在GHOST中引入区块链,用来解决并发问题。改进版本被作为核心共识算法应用于以太坊中。之后,Lerner在DAGCoin中将粒度从块提升到交易,抛弃了打包和计算步骤大大提高了效率。IOTA和ByteBall 应用了无块的概念,发布了开源实现,至今引领市场。随后,一些工作又在DAG的基础上进行了改进。如Spectre,Hashgraph,Nano等。
+
+基于DAG的系统主要有利于需要高性能低消耗的分布式应用(DAPP)。直接应用底层的区块链可以享受到更好的特性,但是需要专业的开发技巧和昂贵的硬件设备。使用一些官方的组件是一种可替代的方案,如IOTA,MAM,Qubic。目前可以考虑应用的领域有: 物联网,数据管理,车载应用,智能家具等。
+
+## 建模
+
+
+
+一个有环无向图由点集和边集组成。点集的每个元素可以是一个交易,一个块,或者协议中的一个事件。边集的元素是一个元组,代表两点之间的关系。
+
+**关键参数** 因为现在模型缺乏具体的实现,使用定性的参数来描述系统的基本技术。
+
+- **出度入度**: 描述每个单元连接数目。 出度是指从节点指出的边,即节点的前任。入度是指指向节点的边,即节点的继承者。
+- **交易模型**:描述如何完成一笔交易。UXTO 代表一种无损耗的输出,交易时原子的,不可分割。每个操作必须通过这些交易完成。Account model 维持一种平衡状态。
+- **可信度**: 一个累加的数字展示一个单元被子块直接或者间接认证的程度。也反映下一轮被选择的概率。
+- **认证**: 一些独特的参数被用于在网络中认证单元。
+
+#### 分类
+
+**节点表现形式**
+
+这个间接显示一个系统结构,是交易,事件或者区块。我们定义两种类型: $1^{od}$ 和 $2^{od} $。 前者表示请求到达时会被即刻处理,不需要等待来自节点的更多请求。这种形式包括区块和触发事件。 后者表示请求需要更多操作,多数情况下这个请求需要被预先计算或打包,然后被散播。这种形式包括区块和事件。
+
+节点形式表示系统结构,同时也决定账本模型,表示交易如何在DAG中生成。有两种交易模型: UXTO-based model 和 account-based model。第一个意味着所有操作都必须通过原子事务来实现。用户可以通过跟踪以前的交易历史来计算余额。对于第二个,每个用户都拥有一个帐户,并且交易被配置为其结构中的字段之一。用户直接在他们的账户中计算余额。
+
+**网络技术**
+
+
+
+分为三种 **发散**,**并行**,**收敛**。发散表示单元在不确定的方向稀疏的传播。并行表示在多个链的单元被一组节点维护。收敛表示单元按照一个确定的趋势收敛到一个确定的序列。
+
+按照上述标准分类如下:
+
+
+## 共识算法
+
+这里讨论共识算法的几个方面。
+
+**开放程度**: 表明一个任意节点是否无限制运行共识算法。
+
+**成员选择**: 选择节点成为出块节点的规则。
+
+**单元分配**: 共识算法的准备。
+
+**单元定位**: 确定一个单元在网络中的位置。
+
+**扩展规则**: 如何扩展图或者链和解除联系。
+
+**冲突解决**: 表示一系列可以确定冲突单元优先级的参数。
+
+**特别技术**: 与其他系统不同的技术。
+
+
+
+#### 第一类
+
+**blockless ane natural expanding graph**
+
+##### IOTA
+
+无限制网络,使用UTXO数据模型,通过交易建立系统。IOTA把节点的事务称为tangle。一个待确认的tip需要先确认前面的两个tip,参与者也共同维护系统安全。但是如果恶意tips被持续生成,可能造成整个图向多个方向发散。所以tip选择算法是必不可少的,有三种机制提供: **一致随机,未加权随机和加权随机移动**。最先进的是加权随机移动算法,是马尔可夫链蒙特卡罗 (MCMC) 算法的应用。有一些修改tip选择算法的变体,如GIOTA,EIOTA。
+
+
+
+##### Graphchain:
+
+无限制网络。
+
+IOAT去除了激励机制,而Graphchain又重新引入。每个交易必须认证足够多的节点来获得激励。
+
+
+
+##### Avalancheq
+
+一个无限制,新共识机制的网络。
+
+共识机制不同于拜占庭和中本聪共识。是一种叫做**Slush**的协议,从gossip算法和流行病网络中获得灵感的CFT容忍协议。
+
+
+
+#### 第二类
+
+**based on blocks,natural expanding graph**
+
+##### Spectre
+
+
+
+一种无限制网络。关键技术是基于块的优先级的递归加权投票算法,
+
+##### Phantom
+
+#### 总结
+
+从上面提到的区块链系统提取出常用的技术:
+
+1. Cross-referencing(交叉引用)。一个块可以引用多个区块,也可以被多个区块引用。交叉引用可以提高吞吐量,扩大规模,降低认证时间。
+2. Trusted authority。一个权威中心来做最后的决定,可以减少确认时间,但是会减弱去中心化特性。
+3. Pairwise vote(成对投票)。2 对 1 的投票选择,而不是正常投票算法中的 n 对 1。
+4. Transaction sharding(事务分片)。将交易分配到不同的链来阻止排序过程中可能的复制和冲突。
+5. PoW 机制。用作一个反恶意节点的工具,对于子序列的PoW是预先计算的,可以保证交易瞬间完成。
+
+对常用的共识机制分析:
+1. Tip selection algorithm。一个新的交易如何选择之前的交易进行确认。增加了吞吐量和规模,一定程度上降低了安全性和一致性。
+2. Recursive algorithm。递归调用一个函数直到得到一个稳定值。这个算法被共识机制采用来使得无序的块聚合成一个有序的链,使系统可以在一个确定的方向扩展。
+3. BFT-style consensus。分为三种
+ - 传统BFT。需要根据资源确定(PoW,PoS)一个commitee,commitee成员来执行共识操作。
+ - async-BA/leaderless BFT: 每个链都可以广播块和投票,当一个块得到足够的票数就可以提交,但是由于这个提交和确认是异步的,所以一个全局的线性排序很难达到。
+ - 前面两种的整合。经典的拜占庭容错协议首先应用于各个独立的区域,上层协议采用async-BA实现跨区域的最终共识。
+4. Nakamoto consensus and its variants (中本聪共识和它的变体)。现存最流行的方法。传统的NC选择最长的链,变体NC选择权重最大的链,多用于形成主链。
+5. Sorting algorithm。按照总体的线性顺序来排序,对于确保全局一致性是必不可少的。根据一些参数来确定优先级。
+
+## 特性分析
+
+### BA和NC特性
+
+拜占庭共识和中本聪共识是最流行的两种共识协议。
+
+#### 拜占庭共识
+
+在存在恶意节点的情况下可以达成的共识。有三个特性:
+
+- argeement:
+- validity:
+- termination:
+
+#### 中本聪共识
+
+允许所有节点可以参与共识通过PoW,PoS等方式。有两个关键特性:
+
+- persistence:
+- liveness:
+
+## 安全分析
+
+
+
+### Parasite Chain Attack
+
+尝试用预先准备好的子链来替换正确的子链。
+
+首先攻击者参照主链来构造一个有很高可信度的子链。然后分别发送一对冲突的交易到主链和构造的私链,接下来要确保子链得到有竞争力的可信度。这时,这个冲突交易可能已经在主链上确认,攻击者再发布他的子链,这样很可能使正确的主链无效然后一个coin可能被使用两次。
+
+这种攻击需要攻击者有充足的算力来生成区块,以没有强力领导者的协议为目标。
+
+### Balance attack / liveness attack
+
+保持多个子图平衡增长来获取收益,攻击者在一个子图发布交易后,又在另一个子图发布交易,动态维持几个子图的平衡来获取收益。
+
+需要一个很大算力,主要攻击基于POW的协议。
+
+### Splitting attack
+
+类似平衡攻击,攻击者找到两个相近的分支或者子图来发送冲突交易获取利润。
+
+攻击者需要有强大的算力,主要攻击没有强力中心的系统。
+
+### Large Weight Attack
+
+
+
+
+### Censorship Attack
+
+### Replay Attack
+
+### Sybi Attack
+
+##
+
+
+
diff --git "a/content/post/DAG\345\214\272\345\235\227\351\223\276\350\256\272\346\226\207\351\230\205\350\257\273.md" "b/content/post/DAG\345\214\272\345\235\227\351\223\276\350\256\272\346\226\207\351\230\205\350\257\273.md"
new file mode 100644
index 0000000..e69798c
--- /dev/null
+++ "b/content/post/DAG\345\214\272\345\235\227\351\223\276\350\256\272\346\226\207\351\230\205\350\257\273.md"
@@ -0,0 +1,87 @@
+---
+author : "KC"
+type : "post"
+tags :
+ - 区块链
+ - 论文阅读
+title: "DAG区块链论文阅读"
+description: 时不时补充
+date: 2022-11-10
+draft: false
+toc: true
+---
+
+
+# 《Direct Acyclic Graph-Based Ledger for Internet of Things: Performance and Security Analysis》
+## 问题背景
+
+由于区块链的安全性,去中心化,可信性,在IoT系统上有可观的应用前景(如智能车,能源交易)。IoT系统具有规模大,资源受限的特性。所以其上的共识算法必须满足资源需求小,低消耗,和高的交易吞吐量。
+
+现在主要的两种共识算法:PoW需要高的资源消耗,PoS的币龄证明可能造成垄断和中心化。
+
+典型的区块链是一种单链结构,为了避免非法的fork,应用的共识算法必须降低新的block生成速率。这导致了吞吐量瓶颈和区块认证延迟的问题,在IoT系统上又有交易花费高和资源消耗大的问题。
+
+DAG共识算法可以允许任何节点可以立即向ledger插入一个新的block,前提是它能先处理更早的交易。这种方式会造成很多fork,DAG有很多算法来避免在传统区块链上面临的double-spending问题(Markov Chain Monte Carlo algorithm and virtual voting algorithm)。DAG共识算法的交易吞吐是不受限制的,而且资源消耗很低,这符合IoT的应用场景。
+
+## DAG概述
+### 名词定义
+
+
+
+这里使用典型的Tangle算法来进行解释。
+
+- Block: 所有块是记录信息的存储单元(包括交易,数字签名,哈希值),在Tangle里一个块记录一个交易
+
+- Tip: 还没有被验证的块(交易)
+
+- Direct approval:直接验证,两个块直接由一条边来链接,称为直接验证。
+
+- indirect approval:间接验证,两个块有通过一个块和
+
+- Own weight: 与它的提出者的工作量有关
+- Cumulative weight: 代表一个交易的认证级别。是一个交易自身own weight以及它直接证明和间接证明的交易的交易own weight总和。
+
+### 共识过程
+
+1. 节点创造一个块来储存交易
+2. 节点通过MCMC tips 选择算法来选择两个没有冲突的tips,然后添加它们的hash到块中
+3. 节点解决一个低难度的pow问题,来避免垃圾信息
+4. 使用私钥给交易签名并广播,当其他节点收到时会检查是否合法
+5. 成功添加的交易成为tip,等待被验证。直到它的cumulative weight 达到定义的标准。
+
+### 分叉问题
+
+
+
+在分布式账本中,构建分叉以重做工作是篡改存储数据的唯一方法。基于此,double-spending的主要思想是将两笔相互冲突的交易并行放置在两条链上。在第一笔交易花费在服务上之后,攻击者扩展包含冲突交易的链并让它超过第一条链。当此操作成功时,第一笔交易将被孤立,攻击者可以多次使用token。
+
+- 单链模型: 以最长的一个链为标准,正常的矿工会在最长的链上工作
+- DAG模型: 以累计权重最大的子图为标准,正常的节点会通过MCMC tips 选择算法扩展权重最大的链。
+
+##
+
+
+
+# 《TIPS: Transaction Inclusion Protocol with Signaling in DAG-based Blockchain》
+## 问题背景
+
+由于DAG区块链的高并发场景和网络延迟,矿工通常不能及时获取整个网络的更新信息,导致重复在一个并行区块包括相同的交易,在区块链中生成冗余的记录。这个交易包含冲突会浪费区块容量和降低系统性能。尽管DAG区块链已经限制交易的高并发,但是交易冲突的风险实际还会诱发**矿工收益**和**系统吞吐**的困境。
+
+### 问题分析
+
+
+
+三种交易包含策略:
+
+1. 随机包含($P^{rand}$): $p_{1}=p_{2}=\cdots=p_{m}=\frac{n}{m}$
+2. 有优先级的随机包含($P^{priority}$): $p_{1} \geq p_{2} \geq \cdots \geq p_{m} \text { and } \frac{p_{1}}{f_{1}}=\frac{p_{2}}{f_{2}}=\cdots=\frac{p_{m}}{f_{m}}$
+3. Top n ($P^{top}$): $p_{1}=p_{2}=\cdots=p_{n}=1 \text { and } p_{n+1}=p_{n+2}=\cdots=p_{m}=0$
+
+这里仅考虑矿工收益中的交易费用奖励。
+
+#### 收入困境
+
+## 算法设计
+
+《SilentDelivery: Practical Timed-delivery of Private Information using Smart Contracts》
+
diff --git "a/content/post/Raft\350\256\272\346\226\207\351\230\205\350\257\273.md" "b/content/post/Raft\350\256\272\346\226\207\351\230\205\350\257\273.md"
new file mode 100644
index 0000000..622c2d3
--- /dev/null
+++ "b/content/post/Raft\350\256\272\346\226\207\351\230\205\350\257\273.md"
@@ -0,0 +1,116 @@
+---
+author : "KC"
+type : "post"
+tags :
+ - 分布式
+ - 论文阅读
+ - Raft
+description: MIT6.824学习
+title: "Raft论文阅读"
+date: 2022-10-30
+draft: false
+toc: true
+---
+
+
+# 领导人选举
+
+首先按照论文中最关键的figure 2补全节点和RPC结构。
+
+节点有三个状态: Leader,Candidate,Follower 和 两个计时器: 选举计时器,心跳计时器。
+
+**Follower**: 有一个选举计时器,随机选举超时时间,每当选举超时,就转变为Candidate.
+
+**Candidate**: 中间态,当Follower一端时间没有收到心跳,选举计时器到期,就会转变为Candidate,term加1,为自己投票并向其他节点发送投票请求,
+
+**Leader**: 当一个Candidate获得半数以上的投票就会转变为Leader,最重要的节点,负责和客户端交互。需要定时向每个Follower发送心跳来维持权威。
+
+
+1. 节点一开始状态都是Follower,Term为0。
+2. 当一个选举计时器到期时,节点转变为Candidate,term加1,开始发送投票请求。这里有三种情况:
+ - 其他节点按照先来先到的原则投票,获得半数以上的投票可以胜出成为Leader.
+ - 在选举过程中得到更高term的RPC,Candidate会转变为Follower.
+ - 如果两个Candidate获得同样的票数,等选举计时器再次超时,会开始下一轮投票。
+3. 选出Leader后,Leader马上广播心跳来维持权威。
+
+代码遇到的问题:
+
+1. 选举超时要真的随机时间,有的随机函数返回的是固定值,这里用时间做种子。
+ ```golang
+ r := rand.New(rand.NewSource(time.Now().UnixNano()))
+ t := time.Duration(ElectionTime+r.Intn(ElectionTime)) * time.Millisecond
+ ```
+2. 由于网络原因,可能一些节点的回复不能及时收到。当收到一个超期的回复时,处理办法就是抛弃。
+
+ ```go
+
+ // 如果回复晚了,不是同一个term或者leader则抛弃
+ // 处理心跳回复
+ if rf.currentTerm == args.Term && rf.state == StateLeader
+
+ // 在本Term内的投票且state仍为Candidate,超时过期的丢弃
+ // 处理投票回复
+ if rf.state == StateCandidate && rf.currentTerm == args.Term
+
+ ```
+
+3. 当收到一个更高term的回复RPC,Candidate转变为Follower,term变为更高的term,投票变为null。
+4. 当收到一个更高的term的心跳时,状态转变为Follower,
+term变为更高的term,投票变为null。
+5. 节点在两种情况拒绝投票,一是Candidate的term小于自己,二是自己在本term中已经投过票。
+ ```golang
+ if rf.currentTerm > args.Term ||
+ (rf.currentTerm == args.Term && rf.votedFor != -1 && rf.votedFor != args.CandidateId)
+ ```
+6. 锁的使用: 当一个数据有写有读,写和读必须加锁。如果一个数据只读不写,不用加锁。
+
+# 日志复制
+
+当选举结束后,leader开始为客户端提供服务。客户端发出的每一条请求会被交给leader处理。
+
+leader将每一条指令打包成一个entry 🙈 :see_no_evil:
🙉 :hear_no_evil:
🙊 :speak_no_evil:
+
+The [Emoji cheat sheet](http://www.emoji-cheat-sheet.com/) is a useful reference for emoji shorthand codes.
+
+***
+
+**N.B.** The above steps enable Unicode Standard emoji characters and sequences in Hugo, however the rendering of these glyphs depends on the browser and the platform. To style the emoji you can either use a third party emoji font or a font stack; e.g.
+
+{{< highlight html >}}
+.emoji {
+font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
+}
+{{< /highlight >}}
+
+{{< css.inline >}}
+
+{{< /css.inline >}}
\ No newline at end of file
diff --git a/themes/tokiwa/exampleSite/content/post/markdown-syntax.md b/themes/tokiwa/exampleSite/content/post/markdown-syntax.md
new file mode 100644
index 0000000..637af1d
--- /dev/null
+++ b/themes/tokiwa/exampleSite/content/post/markdown-syntax.md
@@ -0,0 +1,148 @@
++++
+author = "Hugo Authors"
+title = "Markdown Syntax Guide"
+date = "2019-03-11"
+description = "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
+tags = [
+ "markdown",
+ "css",
+ "html",
+ "themes",
+]
+categories = [
+ "themes",
+ "syntax",
+]
+series = ["Themes Guide"]
+aliases = ["migrate-from-jekyl"]
+toc = true
++++
+
+This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
+
+
+## Headings
+
+The following HTML ``—`
` elements represent six levels of section headings. `
` is the highest section level while `
` is the lowest.
+
+# H1
+## H2
+### H3
+#### H4
+##### H5
+###### H6
+
+## Paragraph
+
+Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat.
+
+Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat.
+
+## Blockquotes
+
+The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations.
+
+#### Blockquote without attribution
+
+> Tiam, ad mint andaepu dandae nostion secatur sequo quae.
+> **Note** that you can use *Markdown syntax* within a blockquote.
+
+#### Blockquote with attribution
+
+> Don't communicate by sharing memory, share memory by communicating.
Test
+ + +``` +#### Code block indented with four spaces + + + + + +Test
+ + + +#### Code block with Hugo's internal highlight shortcode +{{< highlight html >}} + + + + +Test
+ + +{{< /highlight >}} + +## List Types + +#### Ordered List + +1. First item +2. Second item +3. Third item + +#### Unordered List + +* List item +* Another item +* And another item + +#### Nested list + +* Item +1. First Sub-item +2. Second Sub-item + +## Other Elements — abbr, sub, sup, kbd, mark + +GIF is a bitmap image format. + +H2O + +Xn + Yn = Zn + +Press CTRL+ALT+Delete to end the session. + +Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. + diff --git a/themes/tokiwa/exampleSite/content/post/math-typesetting.md b/themes/tokiwa/exampleSite/content/post/math-typesetting.md new file mode 100644 index 0000000..5bfc7ee --- /dev/null +++ b/themes/tokiwa/exampleSite/content/post/math-typesetting.md @@ -0,0 +1,44 @@ +--- +author: Hugo Authors +title: Math Typesetting +date: 2019-03-08 +description: A brief guide to setup KaTeX +--- + +Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. + + +In this example we will be using [KaTeX](https://katex.org/) + +- Create a partial under `/layouts/partials/math.html` +- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally. +- Include the partial in your templates like so: + +``` +{{ if or .Params.math .Site.Params.math }} +{{ partial "math.html" . }} +{{ end }} +``` +- To enable KaTex globally set the parameter `math` to `true` in a project's configuration +- To enable KaTex on a per page basis include the parameter `math: true` in content files. + +**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) +{{< math.inline >}} +{{ if or .Page.Params.math .Site.Params.math }} + + + + +{{ end }} +{{ math.inline >}} + +### Examples + +Inline math: $ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $ + +Block math: + +$$ + \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } +$$ + diff --git a/themes/tokiwa/exampleSite/content/post/math-typesetting.mmark b/themes/tokiwa/exampleSite/content/post/math-typesetting.mmark new file mode 100644 index 0000000..5bfc7ee --- /dev/null +++ b/themes/tokiwa/exampleSite/content/post/math-typesetting.mmark @@ -0,0 +1,44 @@ +--- +author: Hugo Authors +title: Math Typesetting +date: 2019-03-08 +description: A brief guide to setup KaTeX +--- + +Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. + + +In this example we will be using [KaTeX](https://katex.org/) + +- Create a partial under `/layouts/partials/math.html` +- Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally. +- Include the partial in your templates like so: + +``` +{{ if or .Params.math .Site.Params.math }} +{{ partial "math.html" . }} +{{ end }} +``` +- To enable KaTex globally set the parameter `math` to `true` in a project's configuration +- To enable KaTex on a per page basis include the parameter `math: true` in content files. + +**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) +{{< math.inline >}} +{{ if or .Page.Params.math .Site.Params.math }} + + + + +{{ end }} +{{ math.inline >}} + +### Examples + +Inline math: $ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $ + +Block math: + +$$ + \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } +$$ + diff --git a/themes/tokiwa/exampleSite/content/post/placeholder-text.md b/themes/tokiwa/exampleSite/content/post/placeholder-text.md new file mode 100644 index 0000000..378b995 --- /dev/null +++ b/themes/tokiwa/exampleSite/content/post/placeholder-text.md @@ -0,0 +1,58 @@ ++++ +author = "Hugo Authors" +title = "Placeholder Text" +date = "2019-03-09" +description = "Lorem Ipsum Dolor Si Amet" +tags = [ + "markdown", + "text", +] ++++ + +Lorem est tota propiore conpellat pectoribus de +pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice +subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc +caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis +lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum. + +1. Exierant elisi ambit vivere dedere +2. Duce pollice +3. Eris modo +4. Spargitque ferrea quos palude + +Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus +silentia flumen, sustinet placuit petis in dilapsa erat sunt. Atria +tractus malis. + +1. Comas hunc haec pietate fetum procerum dixit +2. Post torum vates letum Tiresia +3. Flumen querellas +4. Arcanaque montibus omnes +5. Quidem et + +# Vagus elidunt + + + +[The Van de Graaf Canon](https://en.wikipedia.org/wiki/Canons_of_page_construction#Van_de_Graaf_canon) + +## Mane refeci capiebant unda mulcebat + +Victa caducifer, malo vulnere contra +dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere +furit nec; iaculi matertera et visa est, viribus. Divesque creatis, tecta novat collumque vulnus est, parvas. **Faces illo pepulere** tempus adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis. + +Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli +Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare +Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert +ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae +vulnus haerentia iuste et exercebat, sui et. + +Eurytus Hector, materna ipsumque ut Politen, nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus, inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa. Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem +Propoetides **parte**. + +{{< css.inline >}} + +{{< /css.inline >}} diff --git a/themes/tokiwa/exampleSite/layouts/.gitkeep b/themes/tokiwa/exampleSite/layouts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/themes/tokiwa/exampleSite/static/.gitignore b/themes/tokiwa/exampleSite/static/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/themes/tokiwa/exampleSite/static/fonts/exampleFont.woff b/themes/tokiwa/exampleSite/static/fonts/exampleFont.woff new file mode 100644 index 0000000..6a4893e Binary files /dev/null and b/themes/tokiwa/exampleSite/static/fonts/exampleFont.woff differ diff --git a/themes/tokiwa/exampleSite/static/fonts/exampleFont.woff2 b/themes/tokiwa/exampleSite/static/fonts/exampleFont.woff2 new file mode 100644 index 0000000..5505e80 Binary files /dev/null and b/themes/tokiwa/exampleSite/static/fonts/exampleFont.woff2 differ diff --git a/themes/tokiwa/exampleSite/static/img/favicon-32x32.png b/themes/tokiwa/exampleSite/static/img/favicon-32x32.png new file mode 100644 index 0000000..57a018e Binary files /dev/null and b/themes/tokiwa/exampleSite/static/img/favicon-32x32.png differ diff --git a/themes/tokiwa/images/screenshot.png b/themes/tokiwa/images/screenshot.png new file mode 100644 index 0000000..cc97310 Binary files /dev/null and b/themes/tokiwa/images/screenshot.png differ diff --git a/themes/tokiwa/images/screenshot02.png b/themes/tokiwa/images/screenshot02.png new file mode 100644 index 0000000..37339d9 Binary files /dev/null and b/themes/tokiwa/images/screenshot02.png differ diff --git a/themes/tokiwa/images/tn.png b/themes/tokiwa/images/tn.png new file mode 100644 index 0000000..6a1472f Binary files /dev/null and b/themes/tokiwa/images/tn.png differ diff --git a/themes/tokiwa/images/tn2.png b/themes/tokiwa/images/tn2.png new file mode 100644 index 0000000..a8ca952 Binary files /dev/null and b/themes/tokiwa/images/tn2.png differ diff --git a/themes/tokiwa/layouts/404.html b/themes/tokiwa/layouts/404.html new file mode 100755 index 0000000..789c042 --- /dev/null +++ b/themes/tokiwa/layouts/404.html @@ -0,0 +1,10 @@ +{{ define "header" }}{{ partial "site-header.html" . }}{{ end }} +{{ define "main" }} +0&&(t="."===(t=e)?null:t),t};ot({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var r,n=e.parser,a=t[4],i=t[5],o=lt(t[0]),s="atom"===o.type&&"open"===o.family?sn(o.text):null,l=lt(t[1]),h="atom"===l.type&&"close"===l.family?sn(l.text):null,m=Ut(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var u="auto",p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=Ut(p.body[0],"textord");u=on[Number(d.text)]}}else p=Ut(p,"textord"),u=on[Number(p.text)];return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h,size:u}},htmlBuilder:nn,mathmlBuilder:an}),ot({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var r=e.parser,n=(e.funcName,e.token);return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Ut(t[0],"size").value,token:n}}}),ot({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var r=e.parser,n=(e.funcName,t[0]),a=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Ut(t[1],"infix").size),i=t[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:nn,mathmlBuilder:an});var ln=function(e,t){var r,n,a=t.style;"supsub"===e.type?(r=e.sup?wt(e.sup,t.havingStyle(a.sup()),t):wt(e.sub,t.havingStyle(a.sub()),t),n=Ut(e.base,"horizBrace")):n=Ut(e,"horizBrace");var i,o=wt(n.base,t.havingBaseStyle(x.DISPLAY)),s=Gt(n,t);if(n.isOver?(i=Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(i=Ke.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t);i=n.isOver?Ke.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Ke.makeVList({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Ke.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t)};ot({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var r=e.parser,n=e.funcName;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:ln,mathmlBuilder:function(e,t){var r=Vt(e.label);return new Tt.MathNode(e.isOver?"mover":"munder",[Rt(e.base,t),r])}}),ot({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=t[1],a=Ut(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:ht(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var r=ft(e.body,t,!1);return Ke.makeAnchor(e.href,[],r,t)},mathmlBuilder:function(e,t){var r=It(e.body,t);return r instanceof zt||(r=new zt("mrow",[r])),r.setAttribute("href",e.href),r}}),ot({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var r=e.parser,n=Ut(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i0&&(u+=M,p-=M)}var z=[{type:"elem",elem:a,shift:p,marginRight:y,marginLeft:w},{type:"elem",elem:n,shift:-u,marginRight:y}];v=Ke.makeVList({positionType:"individualShift",children:z},t)}else if(a){p=Math.max(p,c.sub1,a.height-.8*c.xHeight);var A=[{type:"elem",elem:a,marginLeft:w,marginRight:y}];v=Ke.makeVList({positionType:"shift",positionData:p,children:A},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,n.depth+.25*c.xHeight),v=Ke.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:y}]},t)}var T=yt(m,"right")||"mord";return Ke.makeSpan([T],[m,Ke.makeSpan(["msupsub"],[v])],t)},mathmlBuilder:function(e,t){var r,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,i=[Rt(e.base,t)];if(e.sub&&i.push(Rt(e.sub,t)),e.sup&&i.push(Rt(e.sup,t)),n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;a=o&&"op"===o.type&&o.limits&&t.style===x.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===x.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===x.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===x.DISPLAY)?"munder":"msub"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===x.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===x.DISPLAY)?"mover":"msup"}return new Tt.MathNode(a,i)}}),st({type:"atom",htmlBuilder:function(e,t){return Ke.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[Bt(e.text,e.mode)]);if("bin"===e.family){var n=qt(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var kn={mi:"italic",mn:"normal",mtext:"normal"};st({type:"mathord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mi",[Bt(e.text,e.mode,t)]),n=qt(e,t)||"italic";return n!==kn[r.type]&&r.setAttribute("mathvariant",n),r}}),st({type:"textord",htmlBuilder:function(e,t){return Ke.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var r,n=Bt(e.text,e.mode,t),a=qt(e,t)||"normal";return r="text"===e.mode?new Tt.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new Tt.MathNode("mn",[n]):"\\prime"===e.text?new Tt.MathNode("mo",[n]):new Tt.MathNode("mi",[n]),a!==kn[r.type]&&r.setAttribute("mathvariant",a),r}});var Sn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Mn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};st({type:"spacing",htmlBuilder:function(e,t){if(Mn.hasOwnProperty(e.text)){var r=Mn[e.text].className||"";if("text"===e.mode){var a=Ke.makeOrd(e,t,"textord");return a.classes.push(r),a}return Ke.makeSpan(["mspace",r],[Ke.mathsym(e.text,e.mode,t)],t)}if(Sn.hasOwnProperty(e.text))return Ke.makeSpan(["mspace",Sn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!Mn.hasOwnProperty(e.text)){if(Sn.hasOwnProperty(e.text))return new Tt.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return new Tt.MathNode("mtext",[new Tt.TextNode("\xa0")])}});var zn=function(){var e=new Tt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};st({type:"tag",mathmlBuilder:function(e,t){var r=new Tt.MathNode("mtable",[new Tt.MathNode("mtr",[zn(),new Tt.MathNode("mtd",[It(e.body,t)]),zn(),new Tt.MathNode("mtd",[It(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var An={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Tn={"\\textbf":"textbf","\\textmd":"textmd"},Bn={"\\textit":"textit","\\textup":"textup"},Cn=function(e,t){var r=e.font;return r?An[r]?t.withTextFontFamily(An[r]):Tn[r]?t.withTextFontWeight(Tn[r]):t.withTextFontShape(Bn[r]):t};ot({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var r=e.parser,n=e.funcName,a=t[0];return{type:"text",mode:r.mode,body:ht(a),font:n}},htmlBuilder:function(e,t){var r=Cn(e,t),n=ft(e.body,r,!0);return Ke.makeSpan(["mord","text"],n,r)},mathmlBuilder:function(e,t){var r=Cn(e,t);return It(e.body,r)}}),ot({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=Ke.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=Ke.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return Ke.makeSpan(["mord","underline"],[i],t)},mathmlBuilder:function(e,t){var r=new Tt.MathNode("mo",[new Tt.TextNode("\u203e")]);r.setAttribute("stretchy","true");var n=new Tt.MathNode("munder",[Rt(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),ot({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var r=wt(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Ke.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:function(e,t){return new Tt.MathNode("mpadded",[Rt(e.body,t)],["vcenter"])}}),ot({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,r){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var r=qn(e),n=[],a=t.havingStyle(t.style.text()),i=0;i