4
graphics3d
word-cloud
math.se

This is my categories

Why they are all lowercase.

How can I make them into Uppercase, since my directores in my computers are Uppercases.

![enter image description here][1]

And my titles: WordList, Jekyll will convert it into Wordlist.

YML fronter:

---
layout: post
category: Mathematica//Math-Experiment
Tags: Formula Periodic Sequence
---

https://github.com/HyperGroups/hypergroups.github.com/blob/master/_posts/Mathematica/Math-Experiment/2013-09-11-Math_Experiment_Limit.html

Here you see, I wanna Mathematica becomes category not mathematica

4

2 回答 2

3

以下是我的设置。

ruby 2.1.1p76
jekyll 1.0.2

我也遇到了同样的问题,最终修改了下面的jekyll源文件。(我使用“rvm”)

# vim /usr/local/rvm/gems/ruby-2.1.1/gems/jekyll-1.0.2/lib/jekyll/post.rb

我删除了小写方法。

# diff post.rb.org post.rb
79c79
< self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.to_s.downcase}
---
> self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.to_s}
于 2014-05-17T20:17:43.090 回答
-1

将其设为小写使 Jekyll 更容易解析和处理项目。

我有几个问题要问你:

  1. Jekyll 对类别名称的小写是否会损害您的网站性能或给您带来任何麻烦?
  2. 或者你只是为了美观而想要它?

如果是后者,解决方案是再次将其大写。

{% for tag in page.categories %}
<a href="{{ site.url }}/categories/index.html#{{ page.categories | cgi_encode }}" data-toggle="tooltip" title="Other posts from the {{ tag | capitalize }} category" rel="tag">{{ tag | capitalize }}</a>
{% unless forloop.last %}&nbsp;&bull;&nbsp;
{% endunless %}
{% endfor %}
于 2014-05-18T06:29:47.233 回答