初次使用jekyll的用户-对“页面链接"感到困惑 [英] first time jekyll user - confused about 'page links'

查看:66
本文介绍了初次使用jekyll的用户-对“页面链接"感到困惑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我最终使用jekyll和主题lanyon在github存储库中的gh-pages分支上建立了一个博客.我.但是有些事情仍然困扰着我.

So I finally got a blog going on gh-pages branch in a github repository using jekyll, and the theme lanyon. I love it. But something still bothers me.

在页面上,文章顶部的链接"似乎默认为我尚未真正指定的网址.这就是我的[YYYY-MM-DD-NAME].md文件顶部的样子……

On pages, the 'link' at the top of the article seems to default to a url I haven't really specified. This is what the top of my [YYYY-MM-DD-NAME].md files looks like...

---
layout: post
title: Page Name Here
---

现在,它可以显示,但是Page Name Here显示在顶部,并且可以单击,但是我不知道要在何处设置base url.正如现在呈现的那样,它确实...

Now, it renders okay, but Page Name Here shows up at the top, and is clickable, but I cannot figure out where to set the base url that it goes to. As it renders now, it does ...

[site root]/[page full filename]

但应该是...

[site root]/[repo name]/[page full filename]

而且我不清楚在_config.yml中哪个变量上需要设置以使其正确工作.有什么建议吗?

And I'm not clear on which variable in _config.yml I need to set to make this work right. Any suggestions?

推荐答案

在您使用Jekyll Bootstrap时,发布网址标签是这样的:

As you're using Jekyll Bootstrap a post url tag is like this :

<a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a>

这篇关于初次使用jekyll的用户-对“页面链接"感到困惑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆