问题描述
我正在尝试使用 jekyll 构建 a site。我设法使数学工作并上传了一些文件。现在内容的整体分布不是最优的。
- 我得到了一个指向“HEAD”的链接,其中列出了 Jekyll 的一系列更新。我想摆脱它。
- 主 URL 重定向到一些博客条目,而您必须单击“关于”才能转到有关我的一些一般信息。我想以相反的方式来做,即在页面 https://rjraya.github.io/ 的主 url 中显示 about 部分,在一些派生的 url 中显示博客,如 https://rjraya.github.io/blog
Here 是页面的来源。我怎样才能做这个简单的改变?我知道我使用的是 Minima 模板。
解决方法
回复:头
我认为“HEAD”来自 History.markdown
文件。奇怪的是,“HEAD”没有出现在本地 jekyll serve
开发环境中。我怀疑 code below 在呈现 History.markdown
时会在 jekyll
中拾取 about.md
,以及 header.html
。
<div class="trigger">
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path",path | first -%}
{%- if my_page.title -%}
<a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
{%- endif -%}
{%- endfor -%}
</div>
RE:页面标题 URL Computational reflections
将此行中的 href
从 /
更改为 /blog
https://github.com/rjraya/rjraya.github.io/blob/ddc6a2f5c5804961da6ac79472b7f77052bef267/_includes/header.html#L7
<a class="site-title" rel="author" href="{{ "/blog" | relative_url }}">{{ site.title | escape }}</a>
回复:关于网址
从 permalink : /about/
页面中删除 about.md
。 about.md
将成为下一步的主页(例如 /
)。
https://github.com/rjraya/rjraya.github.io/blob/gh-pages/about.md
RE:在首页about.md
上显示rjraya.github.io
信息并在_posts
下显示rjraya.github.io/blog
降价文件
让 jekyll
使用基于 Markdown 文件名分配永久链接的默认行为。
将 index.md
重命名为 blog.md
。这会将 _posts
文件列表从 /
移至 /blog
。
将 about.md
重命名为 index.md
。这会将 about.md
的内容从 /about
移动到 /
。