Translation notice
This page was translated with machine translation and may contain inaccuracies. If you can help improve it, please open an issue or submit a pull request.
"Feature" submission format guide
This article aims to provide specifications and suggestions for submission formats for creators who intend to submit to "Feature", and lists the special formats supported by this site to facilitate authors' use.
Format specifications for submissions
text format
"Feature" accepts submissions in Markdown format. If you are not familiar with Markdown, you can quickly get started with the following tutorial:
Of course, you can also use the following online editor experience:
Article structure
"Feature" has no strict requirements on the topic selection and writing format of submitted articles, as long as they are related to MC vanilla development. When adopting, the editor may conduct certain discussions and modifications with the author based on the topic of the article.
We recommend including an abstract of the article at the beginning of the article. It will be displayed on the index page and at the beginning of the article, and is an effective tool for readers to briefly understand the central idea of the article.
Regarding the pictures or file references involved in the article, if you need to quote them locally, please put the corresponding pictures and files in the same folder as the document, and package and send them when submitting.
Submission template
We recommend that authors package the article, pictures used in the article, and some other information into a .zip compressed package and send it to <1703467028@qq.com>;
The compressed package can contain an additional folder, in which you can place the header image, the author's social media account information, other descriptions about the article, etc.; when included, the contents will be moved elsewhere.
Below is a sample template we created for contributors to refer to.
Appendix: Reference for common special formats
Vitepress and this site have made some extensions beyond the standard markdown syntax. You can freely use these new syntaxes to optimize the layout of your documents.
In addition, you can also upload your manuscript to our Preview Window to preview how it will appear in the library:
Custom comment block
Vitepress has added some new block-level elements that you can use to make comments:
::: tip 提示标题
这里是提示的内容。
:::
::: warning 警告标题
这里是警告的内容。
:::
::: danger 错误标题
这里是错误的内容。
:::They will render as shown below:
prompt title
Here's what the prompt says.
warning title
Here's what the warning says.
error title
Here is the wrong content.
If you use Typora to write Markdown, maybe you are more familiar with Github-style prompt boxes. Of course, Vitepress also supports this. As shown below:
> [!TIP]提示
> [!WARNING]警告
> [!DANGER]危险folded block
In addition, vitepress adds a folding block element, which you can use in the following ways:
::: details 折叠块
这里是被折叠的内容
:::The rendering effect is as follows:
folded block
Here is the collapsed content.
formula
markdown supports two types of formulas:
- Inline formula: Use a single
$to wrap the formula block; - To occupy a line of formula: start a new paragraph and wrap the formula block with two
$$.
After testing, inline formulas may not support the rendering of more complex formulas. If necessary, try to use a formula block that occupies one line.
sidebar
By default, vitepress supports automatically integrating level 2-6 titles into the right sidebar as index navigation. First-level titles will not be automatically integrated by default. Authors need to pay attention when submitting their manuscripts and try to minimize the use of first-level titles.
mcfunction, snbt and mcdoc syntax support
Vanilla Library adds code block syntax highlighting for mcfunction, snbt and mcdoc. You can use them just like other programming languages:
say mcf语法高亮
execute as @s at @s if entity @s run function foo:bar
tp @s ~ ~ ~ ~ ~
return 0struct myStruct{
myInt: int,
myShort: short,
myString: string,
}NBT tree display support
Vanilla Library supports Wiki-like NBT data structure display format. like:
string1:This is a test tag.
* string2:This is another test tag with a red asterisk indicating required options.
int1:This is an integer test tag.
compound1:This is a compound tag test.
float1:This is a floating-point test tag and serves as a subordinate tag to the previous tag.
list1:This is a list test tag.
This is an item in the list.
double1:This is a double-precision floating point number tag.
multilist:This is a generic tag. It may be a list of bytes, integer, or long.
compound2:This is another compound tag.
You can use<br>to start a new line and write some content, for example: whenfooisbar:bool1:This is a Boolean tag.
any:This is an arbitrary value tag.
compound3:This is a collapsed block style test.
Collapse block style test
- <node type="compound" name="compound4"/>Put some tags inside.
- <node type="any" name="any"/>Put some tags inside.
- <node type="compound" name="compound5"/>This is a nested collapsed block style test.
Nested folding block style test 1
- <node type="any" name="any"/>Put some tags inside.
- <node type="any" name="any"/>Put some tags inside.
Nested folded block style test 2
- <node type="any" name="any"/>Put some tags inside.
byte1:This is a byte type tag. It is deliberately written below the compound tag above to prevent the structure from appearing top-heavy.
homolist:This is not the beast ancestor tag. It represents a list with the same internal elements (the elements can be arbitrary).
The library registers global css styles, which can be implemented using the <div class=nbttree> custom class framework. Note that an empty line is required after the divtag.
<div class="nbttree">
<node type="compound" name=""/> 这是结构根标签。
- <node type="string" name="string1"/>这是一个测试标签。
- <node type="string" name="string2" required=true />这是另一个测试标签,拥有代表必选项的红色星号。
- <node type="int" name="int1"/>这是一个整数测试标签。
- <node type="compound" name="compound1"/>这是一个复合标签测试。
- <node type="float" name="float1"/>这是一个浮点数测试标签,同时作为上一个标签的下级标签。
- <node type="list" name="list1"/>这是一个列表测试标签。
- <node type="compound" name=""/>这是列表的一个项。
- <node type="double" name="double1"/>这是一个双精度浮点数标签。
- <node type="byte_list" name=""/><node type="int_list" name=""/><node type="long_list" name="multilist"/>这是一个泛型标签。它可能是字节、整型或长整型列表。
- <node type="compound" name="compound2"/>这是另一个复合标签。<br>你可以用`<br>`另起一行,写一些内容,例如:当`foo`是`bar`时:
- <node type="bool" name="bool1"/>这是一个布尔值标签。
- <node type="any" name="any"/>这是一个任意值标签。
- <node type="compound" name="compound3"/>这是折叠块样式测试。
<details><summary>折叠块样式测试</summary>
- <node type="compound" name="compound4"/>在里面随便放一点标签。
- <node type="any" name="any"/>在里面随便放一点标签。
- <node type="compound" name="compound5"/>这是嵌套折叠块样式测试。
<details><summary>嵌套折叠块样式测试1</summary>
- <node type="any" name="any"/>在里面随便放一点标签。
- <node type="any" name="any"/>在里面随便放一点标签。
</details>
<details><summary>嵌套折叠块样式测试2</summary>
- <node type="any" name="any"/>在里面随便放一点标签。
</details>
</details>
- <node type="byte" name="byte1"/>这是一个字节型标签。特意写在了上面一个复合标签的下面,使结构不显得头重脚轻。
- <node type="homolist" name="homolist"/>这不是野兽先辈标签。它代表内部元素相同(元素可任意)的列表。
</div>The unordered list style within this block will be replaced by a tree structure similar to the wiki data value section. The level of the unordered list represents the level of the nbt tree.
In addition, we also encapsulate a vue component to facilitate the author to add key types and key names:
key component
Add a key using custom vue component <node />. This component accepts the following parameters:
* type:Key type. Affects icon display.
name:Key name. By default, colons are not displayed.
required:Whether it is required. Default is false. Renders a red asterisk when set to true.
store:must exist when storing. Default is false. Renders blue asterisks when set to true.
colon:Whether to render colon. Default is true. When the value is false or the default key name, the colon is not displayed.
The key type can be one of the following values. If there is no corresponding icon, it will be rendered as any. The following is a comparison table of key types:
| Identifier | Type | Symbol |
|---|---|---|
any | Any value | |
bool | Boolean value | |
byte_list | byte list | |
byte | Byte type | |
list | List | |
double | Double precision floating point number | |
float | Single precision floating point number | |
homolist | List of same elements | |
int_list | integer list | |
int | integer | |
long_list | Long list | |
long | Long type | |
compound | Compound tag | |
short | Short type | |
string | String |
folded block
We also support the use of folded blocks in NBT trees, and have registered a blue background style similar to wiki. Specific performance can be seen in the above example. The usage of folding blocks is similar to the usage of general HTML tags:
- Use HTMLtag
<detail></detail>to wrap the folded block; <detail>can be followed by<summary></summary>package summary description.
However, you need to pay attention to the following points when mixing folding block HTML tags in md documents:
<detail>needs an empty line below so that the unsequenced table format of md can be parsed correctly;<detail>and</detail>need to be written in the same level of indentation;- The indentation of unordered lists inside a collapsible block must be no less than the indentation of the collapsible block itself.
The following is the correct way of writing:
<details><summary>折叠块样式测试</summary>
- <node type="compound" name="compound4"/>在里面随便放一点标签。
- <node type="any" name="any"/>在里面随便放一点标签。
- <node type="compound" name="compound5"/>这是嵌套折叠块样式测试。
<details><summary>嵌套折叠块样式测试1</summary>
- <node type="any" name="any"/>在里面随便放一点标签。
- <node type="any" name="any"/>在里面随便放一点标签。
</details>
<details><summary>嵌套折叠块样式测试2</summary>
- <node type="any" name="any"/>在里面随便放一点标签。
</details>
</details>The following is wrong:
<details><summary>折叠块样式测试</summary>
- <node type="compound" name="compound4"/>在里面随便放一点标签。
- <node type="any" name="any"/>在里面随便放一点标签。
- <node type="compound" name="compound5"/>这是嵌套折叠块样式测试。
<details><summary>嵌套折叠块样式测试1</summary>
- <node type="any" name="any"/>在里面随便放一点标签。
- <node type="any" name="any"/>在里面随便放一点标签。
</details>
<details><summary>嵌套折叠块样式测试2</summary>
- <node type="any" name="any"/>在里面随便放一点标签。
</details>
</details>Other tips
- If a key can accept multiple types of values, you can arrange multiple
nodecomponents on the same line, but only fill in thename,requiredand other parameters in the last component. - Since the rendering of the nbt tree relies on an unordered list, and in markdown's default format, breaking the unordered list within one line will not affect the rendering of the entire list. You can add some conditional descriptions in another line, etc.
- Of course, it will appear as the same line on the render. You still need to use
<br>for line breaks. - You can also use htmltag
<ul><li>directly for more customized writing.
- Of course, it will appear as the same line on the render. You still need to use
- We currently do not support the use of folding blocks and common tags within the tree. Support may be provided in the future, so stay tuned.