简体   繁体   English

如何正确配置 GitBook Space 的 README.md?

[英]How to properly configure GitBook Space's README.md?

I'm using GitBook's GitLab integration to create a documentation for a product my company is preparing to launch.我正在使用 GitBook 的 GitLab 集成为我公司准备推出的产品创建文档。 The below is how the git-sync'd Space currently looks like from app.gitbook.com:下面是来自 app.gitbook.com 的 git-sync'd Space 当前的样子:

在此处输入图像描述

Currently, I have the following files in my project root:目前,我的项目根目录中有以下文件:

usage-doc/
|
+-- README.md
+-- SUMMARY.md
+-- book.json

book.json has the following: book.json具有以下内容:

{
  "title": "Usage Documentation",
  "description": "Hello World"
}

The problems I'd like to solve are the following:我想解决的问题如下:

  1. From the gitbook docs : Title of your book, default value is extracted from the README. On legacy.gitbook.com this field is pre-filled.来自gitbook 文档Title of your book, default value is extracted from the README. On legacy.gitbook.com this field is pre-filled. Title of your book, default value is extracted from the README. On legacy.gitbook.com this field is pre-filled. However neither the title I added inside of README.md , nor the "title" key I had set in book.json seem to be correctly extracted for display on the GitBook space, which you can see still show up as " Untitled " on the sidebar, and the README page displays the generic " README " text, while the title "___ Usage Documentation" shows up as a description underneath.但是,无论是我在README.md中添加的标题,还是我在book.json中设置的"title"键,似乎都没有被正确提取以显示在 GitBook 空间中,您可以看到它仍然显示为“ Untitled ”侧边栏,README 页面显示通用的“ README ”文本,而标题“___ Usage Documentation”显示为下方的说明。

  2. I'd like to add another section link/shortcut on the README page, below "Seller" for "Buyer".我想在自述文件页面上添加另一个部分链接/快捷方式,在“买方”的“卖方”下方。 How would I do that?我该怎么做?

The features you are referring to, are about GitBook Legacy which is a version GitBook hasn't been supporting for years.您所指的功能是关于 GitBook Legacy 的,这是 GitBook 多年来一直不支持的版本。 GitBook is a cloud offering now, and the official docs are here: https://docs.gitbook.com . GitBook 现在是云产品,官方文档在这里: https://docs.gitbook.com

The way to change the title of the space itself in your example is to type the title at the top where it says: "Enter a title for this space".在您的示例中更改空间本身标题的方法是在顶部键入标题:“输入此空间的标题”。 Then let it sync.然后让它同步。 Git sync is a two way sync. Git 同步是双向同步。 When you change something in the GitBook Space, it syncs to the Git repository, and vice versa.当您在 GitBook Space 中更改某些内容时,它会同步到 Git 存储库,反之亦然。

I'd like to add another section link/shortcut on the README page, below "Seller" for "Buyer".我想在自述文件页面上添加另一个部分链接/快捷方式,在“买方”的“卖方”下方。 How would I do that?我该怎么做?

Here's an example SUMMARY.md file that shows pages, a group and a link:这是一个显示页面、组和链接的示例SUMMARY.md文件:

# Table of contents

* [README](README.md)
* [Test](test.md)

## Group

* [Group](group/group.md)

***

* [My blog](https://petros.blog)

The way to add pages, groups, or links from within the space itself is via a change request.从空间本身添加页面、组或链接的方法是通过更改请求。 That is, you need to click Edit to start a new change request.也就是说,您需要单击编辑来启动新的更改请求。 After doing so, you will see a New page option in the left sidebar.这样做之后,您将在左侧边栏中看到一个新页面选项。 If you click the option you can choose what you want to add.如果单击该选项,您可以选择要添加的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM