gpt4 book ai didi

markdown - 新帖子中的 Octopress 大写

转载 作者:行者123 更新时间:2023-12-02 20:04:16 26 4
gpt4 key购买 nike

今天我更新了我的 Octopress 博客,当我运行时:

rake new_post["This is a test of title"]

它在 source/_post/2013-02-18-this-is-a-test-of-title.markdown 中创建我的 markdown 文件,然后我运行:

rake generate

rake preview

帖子现在有了标题

This Is A Test Of Title

我查看了 markdown 的来源并发现

...
title: "This is a test of title"
...

所以 Markdown 没问题。另外,在网页中,我使用 Chrome 的开发人员工具来查看 css 属性是否具有“大写”值,但它没有, anchor 看起来像这样

<a href="...">This Is A Test of Title</a>

看来大写的问题来自于框架。

在 imathis/octopress 存储库的 wiki 中 https://github.com/imathis/octopress/issues/202似乎有些用其他语言发帖的人不喜欢这个“功能”,甚至在 Rakefile 中,imathis 也删除了这一行:

post.puts "title: \"#{title.gsub(/&/,'&amp;').titlecase}\""

对于这个:

post.puts "title: \"#{title.gsub(/&/,'&amp;')}\""

对于该提交,所以我打开我的 Rakefile,它有最后一行,因此我的文件是最新的,但显然问题仍然存在

知道如何避免帖子标题中的这种行为吗?

最佳答案

在您的 _config.yml 中,找到该行

titlecase: true       # Converts page and post titles to titlecase

并将其设置为 false。

有关 titlecase 的更多信息。您还可以查看 plugins/titlecase.rb 以了解其工作原理。

关于markdown - 新帖子中的 Octopress 大写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14932141/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com