【问题标题】:Difference Jekyll local server and githubJekyll本地服务器和github的区别
【发布时间】:2017-01-01 06:47:45
【问题描述】:

我的博客使用 Jekyll(在 GitHub Pages 上)。

当我在本地服务器上运行 Jekyll 时,它看起来不错:

但是当我将站点推送到 GitHub 时,代码部分已损坏:

环境之间有什么区别?这是我的配置文件:

timezone:    America/New_York
locale:      en_US
future:      true
highlighter: rouge
markdown:    kramdown
gems:
  - jekyll-sitemap
sass:
  sass_dir: _sass
  style: compressed
permalink:   /:categories/:title/
paginate: 5
float_share: true
kramdown:
  auto_ids: true
  footnote_nr: 1
  entity_output: as_char
  toc_levels: 1..6
  enable_coderay: true
  coderay:
    coderay_line_numbers: nil
    coderay_line_numbers_start: 1
    coderay_tab_width: 4
    coderay_bold_every: 10
    coderay_css: class

【问题讨论】:

    标签: github jekyll


    【解决方案1】:

    检查这是否是jekyll-kramdown rendering issue,并查看以下config file 是否效果更好。

    对于那些代码块,使用“Creating and highlighting code blocks”中推荐的语法

    例如,语法高亮 Ruby 代码:

    ```ruby
    require 'redcarpet'
    markdown = Redcarpet.new("Hello World!")
    puts markdown.to_html
    ```
    

    【讨论】:

    • 感谢您的评论。
    • 时区:America/New_York locale: en_US future: true highlighter: rouge markdown: kramdown gems: - jekyll-sitemap sass: sass_dir: _sass style: compressed #github.com/mojombo/jekyll/wiki/Permalinks permalink: /:categories/: title/ # 在首页分页显示的帖子数量:5
    • 这是我的配置文件。但我找不到我的配置文件有任何问题。最初,我的配置文件在 github 中运行良好。但是即使我没有改变任何东西,这个问题也会突然发生。
    • @JinyongJeongSteve 您可以使用配置文件的内容编辑您的问题:这将更容易阅读。
    • 谢谢。我在我的问题中添加了部分配置文件
    猜你喜欢
    • 1970-01-01
    • 2013-05-06
    • 1970-01-01
    • 2011-03-19
    • 2016-08-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多