Lui*_*ano 17 markdown github documentation-generation github-pages
我为我的小项目创建了一个精彩的GitHub Pages 网站,并在gh-pages
分支中添加了一些其他页面.我的问题是,每次我从'Settings => Automatic Page Generator'重新生成网站时,一切都被清理干净,我必须手动恢复文件.
有没有办法预防或解决这个问题?
如果自动生成器只是覆盖他的东西而不删除现有文件会好得多.
jbt*_*ule 37
gh-pages
分支._layouts
index.html
到_layouts
_layouts/index.html
替换内容部分的内部html{{content}}
index.md
index.md
前面加上以下内容 index.md
---
layout: index
---
Run Code Online (Sandbox Code Playgroud)_config.yml
包括以下内容_config.yml
:
markdown: kramdown
kramdown:
auto_ids: true
Run Code Online (Sandbox Code Playgroud)
这一步是为了匹配github的markdown语法
添加并提交更改,然后将分支推送回github.
现在你可以简单地在github源代码浏览器中index.md
的gh-branch进行编辑,它将自动使用jekyll进行更新,而不会弄乱gh-branch中的任何内容.
您还可以使用占位符在布局中编辑更多项目{{page.varname}}
,然后添加varname:your text
到您的标题中index.md
.
归档时间: |
|
查看次数: |
5820 次 |
最近记录: |