【问题标题】:How can I change the rendered width of a github README.md?如何更改 github README.md 的呈现宽度?
【发布时间】:2018-09-03 09:23:30
【问题描述】:

浏览到https://github.com/timotheecour/D_vs_nimhttps://github.com/timotheecour/D_vs_nim/blob/master/README.md 时,我希望显示的降价以自定义(更大)宽度显示。那可能吗? 如果可能,宽度将取决于浏览器窗口大小,例如width=max(browser_width, fixed_width)

编辑:好奇https://github.com/github/markup 中的 PR 是否有助于实现这一目标。

【问题讨论】:

    标签: github width markdown readme


    【解决方案1】:

    您需要使用与GitHub Pages 兼容的专用存储库,以便能够根据需要生成降价文件内容(例如具有自定义宽度)。
    见“What is GitHub Pages?”。

    对于其他任何事情,例如常规存储库,只有 GitHub 控制降价页面的呈现方式。

    【讨论】:

    • 我将如何修改github.com/timotheecour/D_vs_nim(我在其中启用了 github 页面)以使降价文件以全宽呈现?在网上找不到任何简单的答案。我的猜测是我需要创建一个自定义 assets/css/style.scss 但不清楚什么属性会使降价全宽
    • @timotheecour 你在用 Jekyll 吗? (如help.github.com/articles/…
    • 是的;但我只是不确定在 style.scss Add any custom CSS (or Sass, including imports) you'd like immediately after the @import line. 中放置什么来达到预期的效果(以便将降价文件呈现为全宽)
    • @timotheecour 您能否将stackoverflow.com/a/38713667/6309 调整为不仅适用于标题,还适用于所有页面?
    【解决方案2】:

    我通过安装 chrome 扩展程序 widescreen for github 为自己解决了这个问题。需要stylus(其他浏览器可用,见https://add0n.com/stylus.html); stylus 取代了旧的 stylish,后者在 chrome 上被禁止。当然,除非他们也使用扩展程序,否则它不会为其他人解决问题。 例如,page 的表格使用该扩展名可以更好地呈现(全宽)。

    我提到的旧答案 https://userstyles.org/styles/108591/github-wide?utm_campaign=stylish_stylepage

    【讨论】:

    • 是的,正如您所提到的,这只会为您解决演示问题。对于其他人,请参阅我的答案。
    猜你喜欢
    • 2022-06-16
    • 2011-03-04
    • 2013-09-14
    • 2011-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多