简体   繁体   English

自定义Gitbook主题

[英]Custom Gitbook Themes

Does anyone know how to modify the look of a git book? 有谁知道如何修改git书的外观? I've seen 2 books that have a different look from the default: http://codac.co/ http://coalman.github.io/tott-gulpjs/book/ 我看过2本书与默认书有不同的外观: http//codac.co/ http://coalman.github.io/tott-gulpjs/book/

But can someone point me in the right direction of how to customize the look and/or build a custom theme for gitbook? 但有人能指出我如何定制外观和/或为gitbook构建自定义主题的正确方向?

I can't seem to find any documentation on customizing a gitbook. 我似乎找不到任何关于自定义gitbook的文档。

If you are using the CLI Toolchain (as opposed to the online editor noted above), you need to create a directory called '/styles' in the root of your book then add a 'website.css' file to that directory. 如果您使用的是CLI工具链(而不是上面提到的在线编辑器),则需要在书的根目录中创建一个名为“/ styles”的目录,然后将“website.css”文件添加到该目录中。

Customize that website.css file to adjust the style of your gitbook. 自定义该website.css文件以调整gitbook的样式。

'gitbook serve' or 'gitbook build' when done to view changes. 完成查看更改后,“gitbook serve”或“gitbook build”。

If you are editing your gitbook online at gitbook.com, you can edit the stylesheets by selecting the down arrow in the far right of the toolbar: 如果您在gitbook.com上在线编辑gitbook,可以通过选择工具栏最右侧的向下箭头来编辑样式表: 在此输入图像描述

You can start to see the theme templates and change too see how it works 您可以开始查看主题模板并更改其工作原理

gitbook / theme / gitbook / theme /

gitbook / theme / stylesheets / gitbook / theme / stylesheets /

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

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