HelloWorld

本文最后更新于 2025年8月21日星期四 06:59

这一段文字是摘要,显示在主页和文章页

语法高亮

Hexo 对 highlight.jsprismjs 两种代码高亮库提供内建支持。 本篇教程将展示如何将 Hexo 的内建语法高亮组件整合至你的模板中。

如何插入代码块

Hexo 支持两种代码块写法——代码块标签插件反引号代码块标签插件

1
2
3
4
5
6
7
8
9
10
11
{% codeblock [title] [lang:language] [url] [link text] [additional options] %}
code snippet
{% endcodeblock %}

{% code [title] [lang:language] [url] [link text] [additional options] %}
code snippet
{% endcode %}

```[language] [title] [url] [link text] [additional options]
code snippet
```

上面的第三种是 Markdown 的 fenced code block 语法。 Hexo 对其进行了扩展,使其支持更多特性。 在标签插件文档中你可以找到可用的选项。

[!TIP]

Hexo 支持用任何格式书写文章,只需安装相应渲染插件即可。 可以使用 markdown、ejs、swig、nunjucks、pug、asciidoc 等。 无论使用哪种格式,这三种代码块语法始终可用。

Hello World

这是一段脚注

Indent paragraphs to include them in the footnote.
`{ my code }`
Add as many paragraphs as you like.

定义列表

First Term
This is the definition of the first term.
Second Term
: This is one definition of the second term.
This is another definition of the second term.

任务列表

  • Write the press release
  • Update the website
  • Contact the media

使用 Emoji 表情

😂

Tag插件

便签

在markdown中加入如下代码使用便签

文字或者markdown都可以

1
int num = 1;

行内标签

123

折叠块

需要折叠的一段内容,支持markdown

勾选框

text

按钮

去百度

脚注

花嫁光辉


HelloWorld
https://zhiyun.blog/HelloWorld/
作者
Okita
发布于
2024年5月12日
许可协议