配置中的 Baseurl 和 url 不适用于 Github 上的 Jekyll



与这个问题非常相似,但是我完全按照两个解决方案所说的去做了。我仍然有相同的404错误。

我有https://enkrypton.moe/osb/。当单击链接时,它从导致404的链接中删除/osb/。https://enkrypton.moe/scripts/ez-lyrics。这是我想要的链接,/osb/, https://enkrypton.moe/osb/scripts/ez-lyrics

Workflow and Config yml

由于Stackoverflow自动垃圾邮件检测,一些链接被删除了,所以如果有人能把它们放回去,我将不胜感激。

我最终将我的url硬编码到。html文件

我让内联图像在Github页面上工作的方式:

  • Inconfig.yml…(1)将url字段设置为仅为"基";你的网址。此URL应该匹配模式https://<your-github-username>.github.io(2)设置baseurl字段为构建此Github Pages存储库的存储库的名称。该字段必须以正斜杠开头,因此/<repository-name>

  • 在实际的Markdown文件中,您将像这样引用图像:

![alt]({{ site.url }}{{ site.baseurl }}/assets/images/filename.jpg)

[来源:https://github.com/mmistakes/minimal-mistakes/blob/master/docs/_posts/2010-08-05-post-image-standard.md]

最新更新