链接的帖子导致 Jekyll 中的 404
Linked posts lead to a 404 in Jekyll
Here 是我正在开发的示例网站。 6 个州的可点击地图应该会指向另一个 post。最顶层的州(查谟和克什米尔)应该导致 post 2018-09-20-jkGIF
位于 _posts
文件夹中。其他州也应该执行类似的操作。
这里的问题是,点击会导致 404 页面。该站点的本地服务可以轻松完成此任务,但 github 支持的版本则不然。
我的 _posts
文件夹中的文件:
2018-09-19-welcome-to-jekyll.markdown
2018-09-20-jkGIF.md
2018-09-21-aniGIF.md
2018-09-21-chanGIF.md
2018-09-21-dadraGIF.md
2018-09-21-damanGIF.md
2018-09-21-goaGIF.md
_config.yml
看起来像:
title: Your awesome title
email: your-email@example.com
description: >- # this means to ignore newlines until "baseurl:"
baseurl: "infer" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: jekyllrb
github_username: jekyll
markdown: kramdown
theme: minima
plugins:
- jekyll-feed
而 _layouts
文件夹中 home
页面的 post 链接程序是:
href={% post_url 2018-09-20-jkGIF %}
(在地图内部,有关更多信息,请进入 this。)
post 包含一个 GIF。这些 GIF 在根文件夹中,并通过以下方式链接到页面:
---
layout: post
title: "Jammu And Kashmir GIFs"
---

我尝试在 jk.gif
之前添加一个斜线,但是没有用。 post 似乎没有链接到主页。
如果需要,您可以查看 this 存储库,或者在评论中提问。
设置你的基地 url : baseurl: "/infer"
并使用它 :
href={{ site.baseurl }}{% post_url 2018-09-20-jkGIF %}
和

Here 是我正在开发的示例网站。 6 个州的可点击地图应该会指向另一个 post。最顶层的州(查谟和克什米尔)应该导致 post 2018-09-20-jkGIF
位于 _posts
文件夹中。其他州也应该执行类似的操作。
这里的问题是,点击会导致 404 页面。该站点的本地服务可以轻松完成此任务,但 github 支持的版本则不然。
我的 _posts
文件夹中的文件:
2018-09-19-welcome-to-jekyll.markdown
2018-09-20-jkGIF.md
2018-09-21-aniGIF.md
2018-09-21-chanGIF.md
2018-09-21-dadraGIF.md
2018-09-21-damanGIF.md
2018-09-21-goaGIF.md
_config.yml
看起来像:
title: Your awesome title
email: your-email@example.com
description: >- # this means to ignore newlines until "baseurl:"
baseurl: "infer" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: jekyllrb
github_username: jekyll
markdown: kramdown
theme: minima
plugins:
- jekyll-feed
而 _layouts
文件夹中 home
页面的 post 链接程序是:
href={% post_url 2018-09-20-jkGIF %}
(在地图内部,有关更多信息,请进入 this。)
post 包含一个 GIF。这些 GIF 在根文件夹中,并通过以下方式链接到页面:
---
layout: post
title: "Jammu And Kashmir GIFs"
---

我尝试在 jk.gif
之前添加一个斜线,但是没有用。 post 似乎没有链接到主页。
如果需要,您可以查看 this 存储库,或者在评论中提问。
设置你的基地 url : baseurl: "/infer"
并使用它 :
href={{ site.baseurl }}{% post_url 2018-09-20-jkGIF %}
和
