Guidelines
Dir Managing
- assetsstores images or other data (determined by key- src_assets)
- docsstores text
- scriptstores scripts (determined by key- src_script)
Naming
The name part should be unique, and
- should be made up of - a-z,- 0-9and- _
- must not be - index, since it will be automatically generated
- setting.tomlis for special use (if it exists), view setting
Markdown Format
- Files should start with - # title, and no- #should be used afterwards.
- For links to the same docs field: - use relative paths 
- use - #subtitleafter a link to markdown file to specify the place, uniqueness must be ensured, it will be turned to- #header-subtitlein HTML
- use - #Lx-Lyafter a link specify the lines of the first codeblock
 
Code Block Format
- Language name should not be empty. Use - plaininstead.
- Use - insert-htmlto insert HTML.
- Use - hideto let something show only after clicking a button.
- Use - encodedto tag that something has been encode, and parsing is still done assuming the format is Markdown.
- Use - is-xxxto insert markdown which will be shown iff- localStorage.getItem("is-xxx") == "true". A setting page shall be given for readers using- insert-htmlblock.
insert-fill inserts a gap-filling answer board. Use TOML:
content = "description, uses **Markdown**"
ans = "standard answer"
ans_regex = "answer judger, if this key doesn't exist, judgement is \"being the same as the standard answer\""
instruction = "instruction (you can choose not to set this key; does not support Markdown)"
Insert Setting
Code-blocks with insert-setting insert tests. It uses TOML and the type key decides the type.
select-is
Currently, type = "select-is" is the only supported mode.
- content is in key - content, does not support Markdown
- choicesdefines a- value=>- display textdict
- defaultdefines the default value
- storedefines a- value=>- localStorage keydict, if key-name starts with- !, the referred key will be set to- "false"
Insert Test
Code-blocks with insert-test insert tests. It also uses TOML.
Structure
There are two main keys: global for global setting and pages, a table-list.
In global setting, name represents the name of the test, time_limit is the time limit (seconds) and full_score is the full score (does not decide how scores are arranged).
The q_pre key decides the question-prefix method, currently only none and number(default) are supported.
For each part, the type key decides the type.
Text
type = "text" means inserting text, content is in key content, supports Markdown
Choice Question
type = "choose" means inserting choice question
- content is in key - content, supports Markdown
- choices indexing is based on - index_charand- index_suffix, the first should be one of- Aa1(defaults to- A), the second defaults to- .
- choicesdefines choices, Markdown isn't supported
- ansdefines answer (use- ACinstead of- CAor- ab)
- scoredefines the score
- ans_dictis a dict (- choice => score), overwrites- ansand- score
Filling Question
type = "fill" means inserting a filling question
- content is in key - content, supports Markdown
- ansdefines answer
- ans_regexdefines regex for judging, overwrites- ans
- scoredefines the score
Grouping
type = "group" defines a group, content is in key content, supports Markdown; type = "group-end" marks the end of a group
- groups can't nest, so it's not necessary to add - group-endblock after every group
- ch_typeprovides default type for parts in the group without- typekey
Scope
index_char, index_suffix and score have scopes. This means they can be defined in global or groups, while local definitions can still overwrite definitions in wider fields.
Insert Random Word
Code-blocks with random-word insert random words. It uses TOML and the id key decides the identifier. pool is an array of dictionaries. For each dictionary, the text key is the text content, and will not be html-unescape.