• 在页面中添加测验功能
    • 添加quiz插件
    • 设置插件配置信息
    • 在md文件中插入quiz

    在页面中添加测验功能

    添加quiz插件

    在book.json中添加如下内容:

    1. {
    2. "plugins": ["quiz"]
    3. }

    运行gitbook install

    设置插件配置信息

    1. "quiz": {
    2. "labels": {
    3. "check": "提交答案",
    4. "showExplanation": "显示解释",
    5. "showCorrect": "显示正确答案",
    6. "explanationHeader": "释义"
    7. },
    8. "text": {
    9. "noChosen": "Choose at least one answer",
    10. "incomplete": "Some correct answers are missing"
    11. },
    12. "buttons": {
    13. "showCorrect": true,
    14. "showExplanation": true
    15. }
    16. }

    在md文件中插入quiz


    What is gitbook used for?

    To read booksTo book hotel named gitTo write and publish beautiful booksGitBook.com lets you write, publish and manage your books online as a service.
    Is it quiz?

    YesNo
    This is multiple dropdown quiz, in each dropdown select a correct number corresponding to the dropdown's order