【问题标题】:Extend website via styles通过样式扩展网站
【发布时间】:2015-03-30 12:49:34
【问题描述】:

我不知道我是否做错了什么,但我有以下问题:

我有一个文件夹,其中包含一些 .md 文件,包括 SUMMARY.mdREADME.md。 我还有一个 localtheme 文件夹,其中的 HTML 做了一些更改。 book.json看起来像这样:

"theme": "./localtheme",
"gitbook": ">=2.0.0",
"styles": {
  "website": "styles/website.css"
}

我已将styles/website.css 添加到localtheme 文件夹中。

现在我的 gitbook 有了我在 localtheme 文件夹中所做的更改,除了 styles/website.css 中的其他样式更改。

我做错了什么?

【问题讨论】:

    标签: gitbook


    【解决方案1】:

    过了一会儿我发现了问题:

    "theme": "./localtheme"
    

    负责你的 gitbook 的完整布局。如果你想通过

    添加新样式
    "styles": {
      "website": "styles/website.css" 
    }
    

    您需要删除theme 行,否则它将不起作用。

    通过这种方式,您可以轻松添加样式并及时了解新的主题更改

    【讨论】:

      猜你喜欢
      • 2018-10-03
      • 1970-01-01
      • 1970-01-01
      • 2011-04-17
      • 1970-01-01
      • 2020-02-14
      • 1970-01-01
      • 2020-05-31
      • 1970-01-01
      相关资源
      最近更新 更多