编辑 GitHub 页中的页脚 jekyll 的默认最小主题
Editing the footer in GitHub pages jekyll's default minima theme
我已经关注 this tutorial and the following ones to create a Github Pages website with Jekyll. Now I have the minima
theme, but it seems to be a different version from the official repo,因为回购 _config.yml
中的参数对我的不起作用(例如,对于 Twitter link 我有一个 twitter_username
参数,而回购的 twitter
在 social_links
下不起作用)。
奇怪的是,在页脚中我重复了两次 title
参数,因为它呈现在 index.html
中的 footer-heading
和 p-name
元素中.有什么方法可以更改 html?
中那些元素的渲染内容
当github advise you to copy master files to override minima gem's files“在你的文件系统某处深处隐藏文件”通过复制主文件时,他们犯了一个错误,因为破坏性的变化可以追加。
覆盖 Jekyll 主题文件的最佳方法(目前)是将 gem 的文件复制到您的工作文件夹。
cd /you/working/jekyll
cp -R `echo "$(bundle info minima --path)/_*/"` .
cp -R `echo "$(bundle info minima --path)/assets/"` .
然后您在工作文件夹(_includes、_layouts、_sass 和 assets 文件夹)中拥有覆盖最小值所需的一切。
如果你有一个 github 页面,你只需要提交并推送到你的发布分支。
页脚使用site.author
。因此,如果您将 author: <your name>
添加到 _config.yml
,您将在页脚中看到 <your name>
。
如果您真的很精简并且只是编辑 .md 文件而不添加主题文件(即依赖于默认的 Jekyll 主题 GitHub Pages 添加),请将其添加到您的 .md 文件,它会删除页脚.
<style>
.footer {
display: none;
}
</style>
要自定义页面的页脚块,您可以覆盖主题中的默认值。将原始文件 footer.html
复制到您存储库的 _includes
文件夹并根据需要对其进行自定义。
另请参阅:
我已经关注 this tutorial and the following ones to create a Github Pages website with Jekyll. Now I have the minima
theme, but it seems to be a different version from the official repo,因为回购 _config.yml
中的参数对我的不起作用(例如,对于 Twitter link 我有一个 twitter_username
参数,而回购的 twitter
在 social_links
下不起作用)。
奇怪的是,在页脚中我重复了两次 title
参数,因为它呈现在 index.html
中的 footer-heading
和 p-name
元素中.有什么方法可以更改 html?
当github advise you to copy master files to override minima gem's files“在你的文件系统某处深处隐藏文件”通过复制主文件时,他们犯了一个错误,因为破坏性的变化可以追加。
覆盖 Jekyll 主题文件的最佳方法(目前)是将 gem 的文件复制到您的工作文件夹。
cd /you/working/jekyll
cp -R `echo "$(bundle info minima --path)/_*/"` .
cp -R `echo "$(bundle info minima --path)/assets/"` .
然后您在工作文件夹(_includes、_layouts、_sass 和 assets 文件夹)中拥有覆盖最小值所需的一切。
如果你有一个 github 页面,你只需要提交并推送到你的发布分支。
页脚使用site.author
。因此,如果您将 author: <your name>
添加到 _config.yml
,您将在页脚中看到 <your name>
。
如果您真的很精简并且只是编辑 .md 文件而不添加主题文件(即依赖于默认的 Jekyll 主题 GitHub Pages 添加),请将其添加到您的 .md 文件,它会删除页脚.
<style>
.footer {
display: none;
}
</style>
要自定义页面的页脚块,您可以覆盖主题中的默认值。将原始文件 footer.html
复制到您存储库的 _includes
文件夹并根据需要对其进行自定义。
另请参阅: