Hexo: make category url and tag url lower case

Created on 19 Jan 2013  路  4Comments  路  Source: hexojs/hexo

This is friendly to case-sensitive server.

feature-request

Most helpful comment

Usage:

Add filename_case to site `_config.yml:

# assign 1 for lower case, 2 for upper case, otherwise do nothing
filename_case: 1

All 4 comments

Modify your theme templates, e.g. _widget/category.ejs, add toLowerCase():

<% site.categories.each(function(item){ %>
  <li><a href="<%- config.root %><%- item.path.toLowerCase() %>"><%= item.name %></a><small><%= item.length %></small></li>
<% }); %>

This does not solve the problem fundamentally

Usage:

Add filename_case to site `_config.yml:

# assign 1 for lower case, 2 for upper case, otherwise do nothing
filename_case: 1

You need to re-run hexo server after change is made on _config.yml

Was this page helpful?
0 / 5 - 0 ratings

Related issues

noraj picture noraj  路  24Comments

201507 picture 201507  路  32Comments

tomap picture tomap  路  21Comments

curbengh picture curbengh  路  24Comments

icepy picture icepy  路  34Comments